49a50,55 > static unsigned int swap_opt_cmd; > module_param(swap_opt_cmd, uint, 0644); > MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\") keys. " > "(For people who want to keep Windows PC keyboard muscle memory. " > "[0] = as-is, Mac layout. 1 = swapped, Windows layout.)"); > 153a160,166 > 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 }, > { } > }; 245a259,265 > if (swap_opt_cmd) { > trans = apple_find_translation(swapped_option_cmd_keys, usage->code); > if (trans) { > input_event(input, usage->type, trans->to, value); > return 1; > } > }