summaryrefslogtreecommitdiff
path: root/include/ui/kbd-state.h
AgeCommit message (Collapse)Author
2019-05-13Normalize header guard symbol definition.Markus Armbruster
We commonly define the header guard symbol without an explicit value. Normalize the exceptions. Done with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190315145123.28030-8-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-02-05kbd-state: add keyboard state trackerGerd Hoffmann
Now that most user interfaces are using QKeyCodes it is easier to have common keyboard code useable by all user interfaces. This patch adds helper code to track the state of all keyboard keys, using a bitmap indexed by QKeyCode. Modifier state is tracked too, as separate bitmap. That makes checking modifier state easier. Likewise we can easily apply special handling for capslock & numlock (toggles on keypress) and ctrl + shift (we have two keys for that). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20190122092814.14919-2-kraxel@redhat.com [ kraxel: added license boilerplate header ] Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>