![]() Somewhere in the maze of output is "keycode = 133" (with a different number)). If you need to change one Super_L to Super_R, first find the keycode you want to be associated to Super_R (aren't sure which is the correct one? Run xev then tap the right Super a couple times. This number is the physical keycode of the key on your keyboard (it can vary by model). The key names in the table all have a hex number in parentheses next to them. (NB: it might give you several Super_L and at least one Super_R. If it did, you now have several extra keys assigned to Control, but none assigned to Super. The output of xmodmap -pm might given you several keys named Super_L but none named Super_R). If you want to undo this later on, just run the same commands with the appropriate arguments. Run the xmodmap command: add control = Super_L Now the physical key is still referred to internally as Super_L, but it doesn't do anything. Run the xmodmap command (using one of the methods above) remove mod4 = Super_L Super_L and Super_R are separate keys which output the same modifier. On my machine (and presumably yours) Super is referred to as mod4. Run xmodmap -pm in a terminal window to get a list of the bound modifiers. First you unmap Super from its modifier, then you map it to control. What you want to do is a two-step process. If you name the file ~/.xmodmap it will be executed automatically on login. xmodmaprc, then execute it in your login items or your. There are a couple ways to execute the changes:Įither from the command line xmodmap -e "your commands" Remembering that I had my K810 for $94.98 back in 2015, what’s the point of all this….To make major changes to your keyboard, including remapping characters and changing modifiers, you need to use the xmodmap utility - see man xmodmap. So I ordered the new K380 model for just $29.99 during the week of black Friday. Final words K380 layoutĪfter all this customization effort, I came across the Logitech K380 model (current alternative to K810), whose layout is exactly the way I customized K810 to be. I like this solution as it is light-weight, targeting a specific event, highly customizable and resolves an issue in a very specific circumstance. Note that the output above has usage values converted to decimal from hexadecimal, with destination on top and source at the bottom. We can still use hidutil command from the previous section to ensure that the custom key mapping remain in effect: It triggers whenever a bluetooth device with specific ProductID and VendorID connects to Mac. The LaunchEvents section narrows down the type of events that will trigger the program with arguments. The dict section (line 7 to line 23) of the file is based on this document as the GitHub comment suggests. Store the file above as ~/Library/LaunchAgents/ (create LaunchAgents directory if it doesn’t exist) and then run the following to load it: "HIDKeyboardModifierMappingDst":0xFF00000003 "HIDKeyboardModifierMappingSrc":0x700000045, "HIDKeyboardModifierMappingDst":0x7000000E6 "HIDKeyboardModifierMappingSrc":0x7000000E4, "HIDKeyboardModifierMappingDst":0x7000000E2 "HIDKeyboardModifierMappingSrc":0x7000000E3, "HIDKeyboardModifierMappingDst":0x7000000E7 "HIDKeyboardModifierMappingSrc":0x7000000E6, "HIDKeyboardModifierMappingDst":0x7000000E3 "HIDKeyboardModifierMappingSrc":0x7000000E2, The native method is not flexible so I did not bother. MacOS does not distinguish them unfortunately. However, in my case I need to keep left ctrl key and overwrite the right ctrl key. In MacOS, you could modify keys from keyboard preference as below. In a nutshell, I need to remap some keys on an external Windows keyboard connected to MacOS (Monterey). Click the dropdown next to COMMAND Key and select Option. Click the dropdown next to OPTION Key and select Command. Since I rely on shortcuts on Magic keyboard, I therefore decide configure key mapping on the Windows key, Alt keys and right ctrl key to match magic keyboard. Choose the PC keyboard from the Select Keyboard dropdown menu at the top of the Modifier keys screen to insure you are modifying the proper keyboard connected to the Mac. The position of left Ctrl and FN is different on magic keyboard too. Magic keyboard has Option key next to cmd key and K810 has Windows key on the left and Ctrl key on the right. For example, magic keyboard has cmd key (aka GUI keys) besides space bar but K810 has Alt. The bottom row has the same number of keys as magic keyboard but with different keys. Logitech K810 is and old model with Windows key layout even though it also supports MacOS. BackgroundĪpple’s magic keyboard does not support multi-device so I have to repurpose my Logitech K810 keyboard with MacBook. This post is to document my steps to use external Windows keyboard on Mac with custom key mapping.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |