@@ -285,14 +285,8 @@ static const struct apple_key_translation apple_iso_keyboard[] = {
static const struct apple_key_translation swapped_option_cmd_keys[] = {
{ KEY_LEFTALT, KEY_LEFTMETA },
{ KEY_LEFTMETA, KEY_LEFTALT },
- { KEY_RIGHTALT, KEY_RIGHTMETA },
- { KEY_RIGHTMETA, KEY_RIGHTALT },
- { }
-};
-
-static const struct apple_key_translation swapped_option_cmd_left_keys[] = {
- { KEY_LEFTALT, KEY_LEFTMETA },
- { KEY_LEFTMETA, KEY_LEFTALT },
+ { KEY_RIGHTALT, KEY_RIGHTMETA, APPLE_FLAG_DONT_TRANSLATE },
+ { KEY_RIGHTMETA, KEY_RIGHTALT, APPLE_FLAG_DONT_TRANSLATE },
{ }
};
@@ -399,12 +393,9 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
}
if (swap_opt_cmd) {
- if (swap_opt_cmd == 2)
- trans = apple_find_translation(swapped_option_cmd_left_keys, code);
- else
- trans = apple_find_translation(swapped_option_cmd_keys, code);
+ trans = apple_find_translation(swapped_option_cmd_keys, code);
- if (trans)
+ if (trans && !(swap_opt_cmd == 2 && trans->flags & APPLE_FLAG_DONT_TRANSLATE))
code = trans->to;
}