mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
fix mask used to extract keycode from KeyboardKey object
Previous 16 bit mask would do the wrong thing if the keycode was > 65536, which is not often true but is certainly a valid value (and seen on some platforms)
This commit is contained in:
parent
cbc6bccc36
commit
7ac9c7e88a
1 changed files with 1 additions and 1 deletions
|
|
@ -52,7 +52,7 @@ class LIBGTKMM2EXT_API KeyboardKey
|
||||||
static KeyboardKey null_key() { return KeyboardKey (0, 0); }
|
static KeyboardKey null_key() { return KeyboardKey (0, 0); }
|
||||||
|
|
||||||
uint32_t state() const { return _val >> 32; }
|
uint32_t state() const { return _val >> 32; }
|
||||||
uint32_t key() const { return _val & 0xffff; }
|
uint32_t key() const { return _val & 0xffffffff; }
|
||||||
|
|
||||||
bool operator<(const KeyboardKey& other) const {
|
bool operator<(const KeyboardKey& other) const {
|
||||||
return _val < other._val;
|
return _val < other._val;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue