Skip to content

Commit

Permalink
Linux left alt support
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Dec 11, 2023
1 parent 481c40d commit 1def4a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game.nim
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ Trying to connect to {state.config.connect_address}.
method unhandled_input*(event: InputEvent) =
if event of InputEventKey:
let event = InputEventKey(event)
# Left alt support. raw_code is an enu specific addition
if (host_os == "macosx" and event.raw_code == 58) or
(host_os == "windows" and event.raw_code == 312):
(host_os == "windows" and event.raw_code == 312) or
(host_os == "linux" and event.raw_code == 65513):

if event.pressed:
state.push_flag CommandMode
Expand Down

0 comments on commit 1def4a2

Please sign in to comment.