mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
display: Handle raw event for key between Shift and Z on ISO keyboards
This key is called raw-< for lack of anything better, it's usually mapped as backslash on US keyboards but that would not allow distinguishing between the backslash key near the enter key.
This commit is contained in:
parent
c358f09f85
commit
d1c756713d
@ -2261,6 +2261,7 @@ map_raw_key(unsigned short keycode) const {
|
|||||||
case 0x07: return KeyboardButton::ascii_key('x');
|
case 0x07: return KeyboardButton::ascii_key('x');
|
||||||
case 0x08: return KeyboardButton::ascii_key('c');
|
case 0x08: return KeyboardButton::ascii_key('c');
|
||||||
case 0x09: return KeyboardButton::ascii_key('v');
|
case 0x09: return KeyboardButton::ascii_key('v');
|
||||||
|
case 0x0A: return KeyboardButton::ascii_key('<');
|
||||||
case 0x0B: return KeyboardButton::ascii_key('b');
|
case 0x0B: return KeyboardButton::ascii_key('b');
|
||||||
case 0x0C: return KeyboardButton::ascii_key('q');
|
case 0x0C: return KeyboardButton::ascii_key('q');
|
||||||
case 0x0D: return KeyboardButton::ascii_key('w');
|
case 0x0D: return KeyboardButton::ascii_key('w');
|
||||||
|
@ -962,7 +962,7 @@ map_button(int code, DeviceClass device_class, int quirks) {
|
|||||||
KeyboardButton::ascii_key('.'),
|
KeyboardButton::ascii_key('.'),
|
||||||
ButtonHandle::none(),
|
ButtonHandle::none(),
|
||||||
ButtonHandle::none(),
|
ButtonHandle::none(),
|
||||||
ButtonHandle::none(),
|
KeyboardButton::ascii_key('<'),
|
||||||
KeyboardButton::f11(),
|
KeyboardButton::f11(),
|
||||||
KeyboardButton::f12(),
|
KeyboardButton::f12(),
|
||||||
ButtonHandle::none(),
|
ButtonHandle::none(),
|
||||||
|
@ -2724,6 +2724,7 @@ lookup_raw_key(LPARAM lparam) const {
|
|||||||
|
|
||||||
// A few additional keys don't fit well in the above table.
|
// A few additional keys don't fit well in the above table.
|
||||||
switch (vsc) {
|
switch (vsc) {
|
||||||
|
case 86: return KeyboardButton::ascii_key('<'); // Between lshift and z
|
||||||
case 87: return KeyboardButton::f11();
|
case 87: return KeyboardButton::f11();
|
||||||
case 88: return KeyboardButton::f12();
|
case 88: return KeyboardButton::f12();
|
||||||
default: return ButtonHandle::none();
|
default: return ButtonHandle::none();
|
||||||
@ -2743,7 +2744,7 @@ get_keyboard_map() const {
|
|||||||
|
|
||||||
wchar_t text[256];
|
wchar_t text[256];
|
||||||
UINT vsc = 0;
|
UINT vsc = 0;
|
||||||
unsigned short ex_vsc[] = {0x57, 0x58,
|
unsigned short ex_vsc[] = {0x56, 0x57, 0x58,
|
||||||
0x011c, 0x011d, 0x0135, 0x0137, 0x0138, 0x0145, 0x0147, 0x0148, 0x0149, 0x014b, 0x014d, 0x014f, 0x0150, 0x0151, 0x0152, 0x0153, 0x015b, 0x015c, 0x015d};
|
0x011c, 0x011d, 0x0135, 0x0137, 0x0138, 0x0145, 0x0147, 0x0148, 0x0149, 0x014b, 0x014d, 0x014f, 0x0150, 0x0151, 0x0152, 0x0153, 0x015b, 0x015c, 0x015d};
|
||||||
|
|
||||||
for (int k = 1; k < 84 + sizeof(ex_vsc) / sizeof(short); ++k) {
|
for (int k = 1; k < 84 + sizeof(ex_vsc) / sizeof(short); ++k) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user