Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The AltGr behaves exactly the same as Ctrl+Alt #425

Merged
merged 2 commits into from
Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/reline/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def call(*args)
end

VK_RETURN = 0x0D
VK_MENU = 0x12
VK_MENU = 0x12 # ALT key
VK_LMENU = 0xA4
VK_CONTROL = 0x11
VK_SHIFT = 0x10
Expand Down Expand Up @@ -249,7 +249,7 @@ def self.process_key_event(repeat_count, virtual_key_code, virtual_scan_code, ch
# no char, only control keys
return if key.char_code == 0 and key.control_keys.any?

@@output_buf.push("\e".ord) if key.control_keys.include?(:ALT)
@@output_buf.push("\e".ord) if key.control_keys.include?(:ALT) and !key.control_keys.include?(:CTRL)

@@output_buf.concat(key.char.bytes)
end
Expand Down