[Commits] [wesnoth/wesnoth] 2459e7: This reworks the hotkey system to rely on keycodes...

GitHub noreply at github.com
Sun Sep 6 08:51:10 UTC 2015


  Branch: refs/heads/sdl2
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 2459e7db10a5f5437e30279ab6952bd9ad9a9123
      https://github.com/wesnoth/wesnoth/commit/2459e7db10a5f5437e30279ab6952bd9ad9a9123
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M data/core/hotkeys.cfg
    M src/CMakeLists.txt
    M src/SConscript
    M src/controller_base.cpp
    M src/gui/auxiliary/event/handler.cpp
    M src/hotkey/command_executor.cpp
    M src/hotkey/command_executor.hpp
    M src/hotkey/hotkey_command.cpp
    M src/hotkey/hotkey_item.cpp
    M src/hotkey/hotkey_item.hpp
    M src/hotkey/hotkey_preferences_display.cpp
    A src/sdl/keyboard.cpp
    A src/sdl/keyboard.hpp
    M src/sdl/utils.cpp

  Log Message:
  -----------
  This reworks the hotkey system to rely on keycodes.

There is a new class introduced, hokey_base, that is the public
interface to the hotkey bindings. It is an abstract class that relies
on concrete classes hokey_keyboard and hotkey_mouse to do the device
specific hotkey work via the template method pattern.

There are two factory methods introduced, load_hotkey and
create_hotkey that should only be used to instantiate new objects.

This commit also changes the hotkey ":" and "+" to ";" respective "="
becausse ":" and "+" are not valid keycodes.


  Commit: 56eb59df5edeedb824e9e9ccfed36370ab7b62f2
      https://github.com/wesnoth/wesnoth/commit/56eb59df5edeedb824e9e9ccfed36370ab7b62f2
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M data/core/hotkeys.cfg
    M src/hotkey/hotkey_item.cpp
    M src/hotkey/hotkey_item.hpp
    M src/sdl/keyboard.cpp
    M src/sdl/keyboard.hpp

  Log Message:
  -----------
  Replace keycode with scancode and fix broken keybindings.

Broken keybindings are fixed byreplacing " " with "space".

Scancodes are tied to physical buttons on the keyboard and are
language independant.


  Commit: 05c1d8a5a97c208a57960afb3e711d6300f9b933
      https://github.com/wesnoth/wesnoth/commit/05c1d8a5a97c208a57960afb3e711d6300f9b933
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp

  Log Message:
  -----------
  Incorporate review feedback from Spindel.


  Commit: e4ddf68c64a93f576ee7483ff2247ec783872f00
      https://github.com/wesnoth/wesnoth/commit/e4ddf68c64a93f576ee7483ff2247ec783872f00
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp

  Log Message:
  -----------
  Fix potential null pointer being returned from "create hotkey"


  Commit: a7cb3f871da44c483f3ce14e10dc25f8cf29cb8c
      https://github.com/wesnoth/wesnoth/commit/a7cb3f871da44c483f3ce14e10dc25f8cf29cb8c
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp
    M src/hotkey/hotkey_item.hpp
    M src/hotkey/hotkey_preferences_display.cpp

  Log Message:
  -----------
  Fix mods in hotkey creation and scope matching in bindings_equal.

I had inadvertedly dropped the keyboard mods in the hotkey creation
factory method, leading to a shortcut like ctrl+t being registered as
simply t.  bindings_equal checked if scopes were exactly equal instead
of overlap, it now checks for overlap instead of equality. A
fundamental limitation of the way hotkeys are handled (both old and
new) is that you cannot have scope specific hotkeys.

This also fixes formatting.


  Commit: 7943cf034c2a42620a0dabfe8cbb56b36569af02
      https://github.com/wesnoth/wesnoth/commit/7943cf034c2a42620a0dabfe8cbb56b36569af02
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-08-25 (Tue, 25 Aug 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp

  Log Message:
  -----------
  Incorporate new review feedback from Spindel.


  Commit: cc28414c4be62542d1ed411ee7682a7596ecec79
      https://github.com/wesnoth/wesnoth/commit/cc28414c4be62542d1ed411ee7682a7596ecec79
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-09-06 (Sun, 06 Sep 2015)

  Changed paths:
    M src/hotkey/hotkey_item.cpp
    M src/hotkey/hotkey_item.hpp
    M src/sdl/keyboard.cpp
    M src/sdl/keyboard.hpp

  Log Message:
  -----------
  Fix presentation bug of keyboard hotkeys and incorporate review feedback.


  Commit: 91cd168ec82de530244170568d99e46ac940ac30
      https://github.com/wesnoth/wesnoth/commit/91cd168ec82de530244170568d99e46ac940ac30
  Author: Andreas Löf <andreas at alternating.net>
  Date:   2015-09-06 (Sun, 06 Sep 2015)

  Changed paths:
    M data/core/hotkeys.cfg
    M src/CMakeLists.txt
    M src/SConscript
    M src/controller_base.cpp
    M src/gui/auxiliary/event/handler.cpp
    M src/hotkey/command_executor.cpp
    M src/hotkey/command_executor.hpp
    M src/hotkey/hotkey_command.cpp
    M src/hotkey/hotkey_item.cpp
    M src/hotkey/hotkey_item.hpp
    M src/hotkey/hotkey_preferences_display.cpp
    A src/sdl/keyboard.cpp
    A src/sdl/keyboard.hpp
    M src/sdl/utils.cpp

  Log Message:
  -----------
  Merge pull request #466 from aginor/hotkeyrewrite

 This reworks the hotkey system to rely on scancodes.


Compare: https://github.com/wesnoth/wesnoth/compare/2459e7db10a5^...91cd168ec82d


More information about the Commits mailing list