Skip to content

Commit

Permalink
Merge pull request #305 from SilverPhoenix99/master
Browse files Browse the repository at this point in the history
Added support for Numpad divide key on Windows.
  • Loading branch information
aycabta committed Jul 22, 2021
2 parents f976727 + 84577da commit 7b1c750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/tool/
*.swp
Gemfile.lock
/.idea/
3 changes: 3 additions & 0 deletions lib/reline/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def call(*args)
VK_LMENU = 0xA4
VK_CONTROL = 0x11
VK_SHIFT = 0x10
VK_DIVIDE = 0x6F

KEY_EVENT = 0x01
WINDOW_BUFFER_SIZE_EVENT = 0x04
Expand Down Expand Up @@ -208,6 +209,8 @@ def self.process_key_event(repeat_count, virtual_key_code, virtual_scan_code, ch
@@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
Expand Down

0 comments on commit 7b1c750

Please sign in to comment.