summaryrefslogtreecommitdiff
path: root/ext/Win32API/getch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Win32API/getch.rb')
-rw-r--r--ext/Win32API/getch.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/Win32API/getch.rb b/ext/Win32API/getch.rb
new file mode 100644
index 0000000..c015bbe
--- /dev/null
+++ b/ext/Win32API/getch.rb
@@ -0,0 +1,5 @@
+require 'Win32API'
+
+getch = Win32API.new("crtdll", "_getch", [], 'L')
+
+puts getch.Call.chr