-
Ok so, I'm making some king of login screen and want to detect the Control+Alt+Delete sequence. So far I've got the control and alt keys detect, but now, how to check for the delete key? bool LogonWidget::on_keyboard(Pond::KeyEvent evt){
bool control = KBD_MOD_CTRL && evt.modifiers;
bool alt = KBD_MOD_ALT && evt.modifiers;
if(control && alt){
evt.key;//How do I check if this is the delete key
}
return false;
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe the keycode for delete is 46 - you can see a list of standard keycodes here. Also, make sure you're using bitwise |
Beta Was this translation helpful? Give feedback.
I believe the keycode for delete is 46 - you can see a list of standard keycodes here. Also, make sure you're using bitwise
&
for your control and alt - something likeKBD_MOD_CTRL & evt.modifiers
.evt.modifiers
is a bitfield of all the different keyboard modifiers, andKBD_MOD_CTRL
andKBD_MOD_ALT
are all single bits corresponding to the appropriate modifier.