mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 18:56:49 +01:00
Updated patch from Olivier Cortes - complete the list of modifier keys that are checked and returned. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28800 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0017304e3d
commit
cf44fcdb52
@ -159,14 +159,30 @@ Keymap::Modifier(uint32 keyCode)
|
||||
uint32
|
||||
Keymap::KeyForModifier(uint32 modifier)
|
||||
{
|
||||
if (modifier == B_LEFT_COMMAND_KEY)
|
||||
if (modifier == B_CAPS_LOCK)
|
||||
return fKeys.caps_key;
|
||||
if (modifier == B_NUM_LOCK)
|
||||
return fKeys.num_key;
|
||||
if (modifier == B_SCROLL_LOCK)
|
||||
return fKeys.scroll_key;
|
||||
if (modifier == B_LEFT_SHIFT_KEY || modifier == B_SHIFT_KEY)
|
||||
return fKeys.left_shift_key;
|
||||
if (modifier == B_RIGHT_SHIFT_KEY)
|
||||
return fKeys.right_shift_key;
|
||||
if (modifier == B_LEFT_COMMAND_KEY || modifier == B_COMMAND_KEY)
|
||||
return fKeys.left_command_key;
|
||||
if (modifier == B_RIGHT_COMMAND_KEY)
|
||||
return fKeys.right_command_key;
|
||||
if (modifier == B_LEFT_CONTROL_KEY)
|
||||
if (modifier == B_LEFT_CONTROL_KEY || modifier == B_CONTROL_KEY)
|
||||
return fKeys.left_control_key;
|
||||
if (modifier == B_RIGHT_CONTROL_KEY)
|
||||
return fKeys.right_control_key;
|
||||
if (modifier == B_LEFT_OPTION_KEY || modifier == B_OPTION_KEY)
|
||||
return fKeys.left_option_key;
|
||||
if (modifier == B_RIGHT_OPTION_KEY)
|
||||
return fKeys.right_option_key;
|
||||
if (modifier == B_MENU_KEY)
|
||||
return fKeys.menu_key;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user