[Differential] [Request, 76 lines] D2768: Remove not-wanted modifiers prior to evaluating global shortcuts

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Wed Sep 14 08:04:26 UTC 2016


graesslin created this revision.
graesslin added reviewers: KWin, Plasma on Wayland, bshah.
Restricted Application added subscribers: kwin, plasma-devel.
Restricted Application added projects: Plasma on Wayland, KWin.

REVISION SUMMARY
  When triggering global shortcuts we are more interested in the hold
  keys than the currently active modifiers. E.g. capslock should not
  be seen as "shift is hold". Similar we need to remove consumed
  modifiers. Shift+5 is % and not Shift+% - the shift modifier is
  consumed and needs to be removed from shortcut evaluation.
  
  To support this we need to have the actual state directly from
  xkbcommon. Thus a new method is added which exposes the modifiers
  relevant for global shortcut matching. In addition on every key press
  all consumed modifiers are calculated and kept so that they can be
  used for shortcut matching.
  
  In addition a workaround is added for Backtab. Similar workaround
  exists in kglobalaccel for X11. The problem is that our shortcuts are
  stored incorrectly: Shift+Tab instead of Backtab. Thus a mapping back
  is required. To make everything worse KWin registers the wrong key
  sequence "Alt+Shift+Backtab" which doesn't make any sense and is
  broken on X11 at least.
  
  The workaround supports both special cases. The one for Backtab should
  be turned into Shift+Tab and also KWin's special case of adding shift
  to backtab.
  
  CCBUG: 368581

REPOSITORY
  rKWIN KWin

BRANCH
  shortcuts-consumed-modifiers

REVISION DETAIL
  https://phabricator.kde.org/D2768

AFFECTED FILES
  autotests/integration/globalshortcuts_test.cpp
  autotests/integration/tabbox_test.cpp
  globalshortcuts.cpp
  input.cpp
  keyboard_input.cpp
  keyboard_input.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland, bshah
Cc: plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160914/a3d5e240/attachment.html>


More information about the Plasma-devel mailing list