ruby-changes:66989
From: SilverPhoenix99 <ko1@a...>
Date: Fri, 30 Jul 2021 02:27:03 +0900 (JST)
Subject: [ruby-changes:66989] 1bf768d2e1 (master): [ruby/reline] Added support for Numpad divide key on Windows.
https://git.ruby-lang.org/ruby.git/commit/?id=1bf768d2e1 From 1bf768d2e1f56457d5e2b35d90719553bf1f9601 Mon Sep 17 00:00:00 2001 From: SilverPhoenix99 <silver.phoenix99@g...> Date: Wed, 21 Jul 2021 19:11:09 +0100 Subject: [ruby/reline] Added support for Numpad divide key on Windows. https://github.com/ruby/reline/commit/84577da0c4 --- lib/reline/windows.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb index 08d9030..f095250 100644 --- a/lib/reline/windows.rb +++ b/lib/reline/windows.rb @@ -91,6 +91,7 @@ class Reline::Windows https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L91 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 https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L209 @@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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/