Press any key to continue...

Press any key to continue...
PAUSE

1 Bash[ | ]

read -sn 1 -p "Press any key to continue..."

2 CMD[ | ]

PAUSE

3 C#[ | ]

Console.Out.WriteLine("Press any key to continue...");
Console.ReadKey();

4 Java[ | ]

import java.io.IOException;

public class Main {
    public static void main(String[] args) {
        pressAnyKeyToContinue();
    }

    private static void pressAnyKeyToContinue() {
        System.out.println("Press any key to continue...");
        try {
            new ProcessBuilder("cmd", "/c", "pause > null").inheritIO().start().waitFor();
        } catch (InterruptedException | IOException e) {
            e.printStackTrace();
        }
    }
}

5 PHP[ | ]

echo 'Press any key to continue...';
fgetc(STDIN);

6 PowerShell[ | ]

echo 'Press any key to continue...'
$null = [System.Console]::ReadKey()
echo 'Press any key to continue...'
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');

7 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}