From fa5a258e932d82123545c4ddba0be0ca370fa303 Mon Sep 17 00:00:00 2001 From: aycabta Date: Fri, 28 May 2021 17:09:25 +0900 Subject: [ruby/reline] Treat C-Space as M-Space on Windows https://github.com/ruby/reline/commit/69beca2863 --- lib/reline/windows.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/reline') diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb index 46f8795daa..bf729ea254 100644 --- a/lib/reline/windows.rb +++ b/lib/reline/windows.rb @@ -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) -- cgit v1.2.3