Skip to content

Conversation

@johnd0e
Copy link
Contributor

@johnd0e johnd0e commented Jun 2, 2025

A press/release of AltGr is translated by the system into the press/release of two keys - LCtrl and RAlt. In Far, for modifiers, activation is registered upon release, and the problem with AltGr is that, being a combined event, it triggered upon the release of the very first key in the combination - LCtrl, thereby producing "CtrlRAlt" instead of the expected "RAlt" (similarly for compound combinations).

This patch prevents premature reaction to the LCtrl release event.

@johnd0e johnd0e marked this pull request as draft June 2, 2025 00:50
@johnd0e johnd0e force-pushed the fix-altgr branch 3 times, most recently from fafc506 to 0f75538 Compare June 3, 2025 16:27
@johnd0e johnd0e marked this pull request as ready for review June 3, 2025 16:41
@johnd0e
Copy link
Contributor Author

johnd0e commented Jun 3, 2025

keys old new
AltGr "CtrlRAlt" "RAlt"
Alt+AltGr "CtrlRAlt" "AltRAlt"
AltGr+Alt "AltRAlt" "AltRAlt"
Ctrl+AltGr "CtrlRAlt" "CtrlRAlt"
Shift+AltGr "CtrlRAltShift" "RAltShift"
AltGr+Shift "CtrlRAltShift" "CtrlRAltShift"
Ctrl + Shift+AltGr "CtrlRAltShift" "CtrlRAltShift"
Ctrl + AltGr+Shift "RAltShift" "RAltShift"
Ctrl + Alt+AltGr "CtrlAltRAlt" "CtrlAltRAlt"
Ctrl + AltGr+Alt "AltRAlt" "AltRAlt"
Alt + AltGr+Ctrl "CtrlRAlt" "CtrlRAlt"
test.lua
panel.GetUserScreen()
mf.printconsole "Press key ('Esc' to quit)"
repeat
  local key = mf.waitkey()
  mf.printconsole(key)
until key=="Esc"
panel.SetUserScreen()

@johnd0e johnd0e marked this pull request as draft June 3, 2025 21:38
@johnd0e johnd0e marked this pull request as ready for review June 3, 2025 22:09
@johnd0e
Copy link
Contributor Author

johnd0e commented Jun 3, 2025

@alabuzhev @zg0

johnd0e added 2 commits June 4, 2025 02:33
A press/release of AltGr is translated by the system into the press/release of two keys - LCtrl and RAlt. In Far, for modifiers, activation is registered upon release, and the problem with AltGr is that, being a combined event, it triggered upon the release of the very first key in the combination - LCtrl, thereby producing "CtrlRAlt" instead of the expected "RAlt" (similarly for compound combinations).

This patch prevents premature reaction to the LCtrl release event.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 4, 2025

@johnd0e
Copy link
Contributor Author

johnd0e commented Jun 14, 2025

@zg0 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant