[前][次][番号順一覧][スレッド一覧]

ruby-changes:66526

From: aycabta <ko1@a...>
Date: Mon, 21 Jun 2021 18:44:35 +0900 (JST)
Subject: [ruby-changes:66526] fa5a258e93 (master): [ruby/reline] Treat C-Space as M-Space on Windows

https://git.ruby-lang.org/ruby.git/commit/?id=fa5a258e93

From fa5a258e932d82123545c4ddba0be0ca370fa303 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
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(+)

diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index 46f8795..bf729ea 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -185,6 +185,10 @@ class Reline::Windows https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L185
       # 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.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]