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

ruby-changes:66987

From: aycabta <ko1@a...>
Date: Fri, 30 Jul 2021 02:27:02 +0900 (JST)
Subject: [ruby-changes:66987] 750359ce81 (master): [ruby/reline] Support Enter key of numpad on Windows

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

From 750359ce81d2c390d667999f7c900c9b395b93b8 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Sun, 18 Jul 2021 22:10:48 +0900
Subject: [ruby/reline] Support Enter key of numpad on Windows

The yamatanooroti gem can't emulate numpad key pressing...

https://github.com/ruby/reline/commit/8e9da1aeaf
---
 lib/reline/windows.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/reline/windows.rb b/lib/reline/windows.rb
index 4a36bf4..08d9030 100644
--- a/lib/reline/windows.rb
+++ b/lib/reline/windows.rb
@@ -206,6 +206,8 @@ class Reline::Windows https://github.com/ruby/ruby/blob/trunk/lib/reline/windows.rb#L206
         @@output_buf.push(0, 80)
       when VK_DELETE
         @@output_buf.push(0, 83)
+      when VK_RETURN
+        @@output_buf.push(char_code) # must be 0x0D
       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/

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