1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Treat C-Space as M-Space on Windows

https://github.com/ruby/reline/commit/69beca2863
This commit is contained in:
aycabta 2021-05-28 17:09:25 +09:00
parent 582b5705ab
commit fa5a258e93

View file

@ -185,6 +185,10 @@ class Reline::Windows
# It's treated as Meta+Enter on Windows.
@@output_buf.push("\e".ord)
@@output_buf.push(char_code)
elsif char_code == 0x20 and control_key_state.anybits?(LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
# It's treated as Meta+Space on Windows.
@@output_buf.push("\e".ord)
@@output_buf.push(char_code)
elsif control_key_state.anybits?(LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)
@@output_buf.push("\e".ord)
@@output_buf.concat(char.bytes)