[Commits] [wesnoth/wesnoth] 5bd79e: More corrections for hot-key detection in SDL1.2

GitHub noreply at github.com
Sat Oct 17 08:57:17 UTC 2015


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 5bd79efa8b615e020ed6adc6abd036133cc739e7
      https://github.com/wesnoth/wesnoth/commit/5bd79efa8b615e020ed6adc6abd036133cc739e7
  Author: Wedge009 <wedge009 at wedge009.net>
  Date:   2015-10-17 (Sat, 17 Oct 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp

  Log Message:
  -----------
  More corrections for hot-key detection in SDL1.2

This is an extension of https://github.com/wesnoth/wesnoth/pull/450.

Instead of specifically checking for Ctrl+j and Ctrl+m, I now make this a general check: that letters should match their respective key codes. This will still cover the Ctrl+Return/Enter combination fixed in PR 450, but also some of the combinations noted in that PR.

Ctrl+Tab was one combination noted to not work in Linux (though it did in WindowS) as it was being mis-read as Ctrl+i. Ctrl+Tab will now work correctly in Linux.

Strangely, Ctrl+Scroll Lock and Ctrl+Pause (while working in Linux) were being mis-read as Ctrl+c in Windows. This change will cover this hot-key as well.

Unfortunately, I cannot test whether there will be any improvement or regression in OS X.

With hot-key handling being rewritten for SDL2 this change may seem moot, but it will still improve things for the current 1.12 release. This change also resolves concerns some have had regarding the special-case nature of the Ctrl+j/Ctrl+m check previously used.





More information about the Commits mailing list