Code prior to 2012-10-14T18:33:00Z!fabianmueller5@gmx.de tested iterator type to identify whether
character or keycode should be matched

Afterward it tested the input character, which always had both set to
a valid value

As a result, since the hotkey only stored the keycode, any non
printing character (alt+x, Fn, etc.) could never match This switches
the test back to the value in the iterator
This commit is contained in:
Simon Forsyth 2012-11-26 21:13:07 +00:00
parent ac45bd0fa5
commit cfa466fca6

View file

@ -675,7 +675,7 @@ hotkey_item& get_hotkey(int character, int keycode,
bool found = false;
for (itor = hotkeys_.begin(); itor != hotkeys_.end(); ++itor) {
if (character != -1) {
if (itor->get_character() != -1) {
if (character == itor->get_character()) {
if (ctrl == itor->get_ctrl()
&& cmd == itor->get_cmd()
@ -690,7 +690,7 @@ hotkey_item& get_hotkey(int character, int keycode,
}
DBG_G << "Could match by character..." << "but modifiers different\n";
}
} else if (keycode != -1) {
} else if (itor->get_keycode() != -1) {
if (keycode == itor->get_keycode()) {
if (shift == itor->get_shift()
&& ctrl == itor->get_ctrl()