aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSilverPhoenix99 <silver.phoenix99@gmail.com>2021-07-21 19:11:09 +0100
committeraycabta <aycabta@gmail.com>2021-07-30 02:27:02 +0900
commit1bf768d2e1f56457d5e2b35d90719553bf1f9601 (patch)
tree4c27935e77df30e435055ed6d5bd37891cb0d288 /lib
parent750359ce81d2c390d667999f7c900c9b395b93b8 (diff)
downloadruby-1bf768d2e1f56457d5e2b35d90719553bf1f9601.tar.gz
[ruby/reline] Added support for Numpad divide key on Windows.
https://github.com/ruby/reline/commit/84577da0c4
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/windows.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index 08d90306c7..f0952507b5 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -91,6 +91,7 @@ class Reline::Windows
VK_LMENU = 0xA4
VK_CONTROL = 0x11
VK_SHIFT = 0x10
+ VK_DIVIDE = 0x6F
KEY_EVENT = 0x01
WINDOW_BUFFER_SIZE_EVENT = 0x04
@@ -208,6 +209,8 @@ class Reline::Windows
@@output_buf.push(0, 83)
when VK_RETURN
@@output_buf.push(char_code) # must be 0x0D
+ when VK_DIVIDE
+ @@output_buf.push(char_code)
end
elsif char_code == 0 and control_key_state != 0
# unknown