mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Added support for Numpad divide key on Windows.
84577da0c4
This commit is contained in:
parent
750359ce81
commit
1bf768d2e1
1 changed files with 3 additions and 0 deletions
|
@ -91,6 +91,7 @@ class Reline::Windows
|
||||||
VK_LMENU = 0xA4
|
VK_LMENU = 0xA4
|
||||||
VK_CONTROL = 0x11
|
VK_CONTROL = 0x11
|
||||||
VK_SHIFT = 0x10
|
VK_SHIFT = 0x10
|
||||||
|
VK_DIVIDE = 0x6F
|
||||||
|
|
||||||
KEY_EVENT = 0x01
|
KEY_EVENT = 0x01
|
||||||
WINDOW_BUFFER_SIZE_EVENT = 0x04
|
WINDOW_BUFFER_SIZE_EVENT = 0x04
|
||||||
|
@ -208,6 +209,8 @@ class Reline::Windows
|
||||||
@@output_buf.push(0, 83)
|
@@output_buf.push(0, 83)
|
||||||
when VK_RETURN
|
when VK_RETURN
|
||||||
@@output_buf.push(char_code) # must be 0x0D
|
@@output_buf.push(char_code) # must be 0x0D
|
||||||
|
when VK_DIVIDE
|
||||||
|
@@output_buf.push(char_code)
|
||||||
end
|
end
|
||||||
elsif char_code == 0 and control_key_state != 0
|
elsif char_code == 0 and control_key_state != 0
|
||||||
# unknown
|
# unknown
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue