Page MenuHomeWildfire Games

Further Hotkey fixes.
ClosedPublic

Authored by wraitii on Jan 17 2021, 12:21 PM.

Details

Reviewers
None
Commits
rP24675: Further Hotkey fixes.
Trac Tickets
#5930
Summary

rP24645 broke meta-key releases. This fixes that.
While investigating, I also discovered a bug already present in A23: if you press Ctrl, then D, then your 'Ctrl' hotkeys remain active. This does not happen if you go "D then Ctrl".
It's buggy and problematic as it might lead to hotkey conflicts.
Unfortunately fixing that isn't trivial. This is my best shot, I haven't noticed anything odd.

This introduces tests for some basic level of sanity checks.

Test Plan

Try know hotkeys with combinations, lifting keys in different orders. Try moving the camera around in many ways. Try meta keys.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Jan 17 2021, 12:21 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /Sy

See https://jenkins.wildfiregames.com/job/macos-differential/2914/display/redirect for more details.

wraitii requested review of this revision.Jan 17 2021, 1:45 PM
Langbart added a subscriber: Langbart.EditedJan 17 2021, 2:15 PM

Wraitii, I've been playing around for 2 hours and have yet to encounter a significant problem. D3396

The only thing I encountered so far. (This appears also without your patch, )
alt+y (show sky)
ERROR: Errors executing script event "Press"
ERROR: JavaScript error: internal(28) Press line 1 Engine.Renderer_GetShowSkyEnabled is not a function eventhandler608 (Press)@__internal(28) Press:1:26

PS: the error doesn't appear for Angen_, testing the latest SVN
PPS: the error has been fixed by Vladislav (Changeset 24663)

wraitii updated this revision to Diff 15445.Jan 17 2021, 8:48 PM

Fix #5927 while at it.

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file f

See https://jenkins.wildfiregames.com/job/macos-differential/2931/display/redirect for more details.

On a standard MacBook keyboard layout, there is no "Delete" key, only "Backspace". Source:Keyshorts.com/blog
Pressing "Backspace", asks me if I want to kill the unit, as intended.
"Shift "+"Backspace" does nothing. In theory it should kill the unit without asking. Hovering over the skull says this option works, it does not (see Picture below)
Pressing "Fn"+"Shift"+"Backspace" kills the unit without asking

#5867 suggests this might be addressed in A25 (Created by wraitii)

Both "Backspace" and "Shift"+"Backspace" do not work in Alpha 23b. (using the additional key "Fn" works)

Langbart added a subscriber: elexis.EditedJan 18 2021, 12:57 AM

Opening "Hotkey" from the menu option looks like in the picture below(A). You find options like "fps.toggle" I am not sure this is intended to appear like this.
There is also a nice looking version made by @elexis (B) I found it in the ticket #2604 (elexis:"laying around since Aug 19 2017")


Edit1: ImageA It appears to be intentionally designed that way. The same screen can be seen in D2814
Edit2: ImageB I guess there is some legal/financial reason, it can't be used. #2604

This revision was not accepted when it landed; it landed in state Needs Review.Jan 18 2021, 11:58 AM
Closed by commit rP24675: Further Hotkey fixes. (authored by wraitii). · Explain Why
This revision was automatically updated to reflect the committed changes.