Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3495 closed defect (fixed)

[PATCH] Hotkey combinations using more than 2 keys function when only pressing two of the bound keys

Reported by: AlThePhoenix Owned by: ben
Priority: Release Blocker Milestone: Alpha 19
Component: UI & Simulation Keywords: patch
Cc: leper Patch:

Description

Some hotkeys do not work for me (and as reported a few other people as well) since r16913. The affected hotkeys are ALT + S for toggling silhouettes and Alt + Z for toggling the skybox, as well as SHIFT + Z for queueing up units and maybe some other combinations I have not yet detected to not be working.

After some research I found out that combinations with more than 2 mapped keys work when only pressing 2 of those keys. A little bit simpler:

  1. ALT + Z does not work

-The skybox is not being toggled because ALT + Z actually reduces the zoom speed (zooming done by using the + / - keys on the keyboard, NOT using the mousewheel), while it should actually require pressing CTRL as well, but it doesn't -Changing the hotkey for increasing zoom speed (e.g. using J instead of Z) makes toggling the skybox work again

  1. ALT + S does not work

-ALT + S doesn't toggle silhouettes because it actually reduces the scrolling speed (the hotkey for that should actually require holding CTRL as well, but it doesn't) -Changing the scrolling speed decrease hotkey to something else (e.g. using Y instead of S) makes toggling silhouettes possible again

  1. SHIFT + Z for production queues doesn't work

-See ALT + Z

-changing the keyboard layout has no effect on this, thus most likely unrelated to #2850 -combinations using more than 2 keys work when only pressing 2 of the mapped keys, given that the combination isn't mapped multiple times (e.g. pressing CTRL+R doesn't do anything since it would both increase and decrease the rotation speed; see default.cfg key bindings)

Attachments (1)

t3495_fix_hotkey_combos_v1.patch (1.2 KB ) - added by elexis 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:2 by historic_bruno, 9 years ago

Cc: leper added
Milestone: BacklogAlpha 19
Priority: Should HaveRelease Blocker

Reverting r16888 fixes it for me, specifically the changes to Hotkey.cpp.

comment:3 by leper, 9 years ago

Seems like two && accept in two loop conditions got lost in that commit. Reintroducing those (or breaking those on !accept should fix the issue.

by elexis, 9 years ago

comment:4 by elexis, 9 years ago

Keywords: patch review added; hotkeys removed
Summary: Hotkey combinations using more than 2 keys function when only pressing two of the bound keys[PATCH] Hotkey combinations using more than 2 keys function when only pressing two of the bound keys

Thanks to Evulant for the thorough investigation :) The issue is reproducible on my system too and indeed it is caused by those two accepts.

comment:5 by ben, 9 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 17116:

Fixes hotkey bugs introduced in r16888, patch by elexis. Fixes #3495

comment:6 by historic_bruno, 9 years ago

Keywords: review removed

Thanks for the quick responses on this :)

Note: See TracTickets for help on using tickets.