mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Fix shift modifier (keys were sent as shift-A instead of shift-a) and add some more key input debug info
This commit is contained in:
parent
531c5907fc
commit
9866d2d69f
@ -1571,16 +1571,24 @@ handle_key_event(NSEvent *event) {
|
||||
// That done, continue trying to find out the button handle.
|
||||
if ([str canBeConvertedToEncoding: NSASCIIStringEncoding]) {
|
||||
// Nhm, ascii character perhaps?
|
||||
str = [str lowercaseString];
|
||||
button = KeyboardButton::ascii_key([str cStringUsingEncoding: NSASCIIStringEncoding]);
|
||||
}
|
||||
}
|
||||
|
||||
if (button == ButtonHandle::none()) {
|
||||
cocoadisplay_cat.warning()
|
||||
<< "Unhandled keypress, character " << (int) c << ", keyCode " << [event keyCode] << "\n";
|
||||
<< "Unhandled keypress, character " << (int) c << ", keyCode " << [event keyCode]
|
||||
<< ", type " << [event type] << ", flags " << [event modifierFlags] << "\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (cocoadisplay_cat.is_spam()) {
|
||||
cocoadisplay_cat.spam()
|
||||
<< "Handled keypress, character " << (int) c << ", keyCode " << [event keyCode]
|
||||
<< ", type " << [event type] << ", flags " << [event modifierFlags] << "\n";
|
||||
}
|
||||
|
||||
// Let's get it off our chest.
|
||||
if ([event type] == NSKeyUp) {
|
||||
_input_devices[0].button_up(button);
|
||||
|
Loading…
x
Reference in New Issue
Block a user