Last active
December 22, 2024 00:09
-
-
Save bartosjiri/da83eb003bc9b1d7aeb8bd6136edbc62 to your computer and use it in GitHub Desktop.
Revisions
-
bartosjiri revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,4 +50,4 @@ Xmodmap configuration that swaps <kbd>ctrl</kbd> and <kbd>cmd</kbd> keys to achi ``` ## Limitations - This modification does not replicate the macOS terminal controls (i.e. <kbd>ctrl</kbd>+<kbd>c</kbd> to cancel). A workaround for this limitation is possible with [AutoKey scripts](https://github.com/bartosjiri/autokey-macos). -
bartosjiri revised this gist
Aug 15, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,4 +50,4 @@ Xmodmap configuration that swaps <kbd>ctrl</kbd> and <kbd>cmd</kbd> keys to achi ``` ## Limitations - This modification does not replicate the macOS terminal controls (i.e. <kbd>ctrl</kbd>+<kbd>c</kbd> to cancel). A workaround for this limitation is possible with [AutoKey scripts](hhttps://github.com/bartosjiri/autokey-macos). -
bartosjiri revised this gist
Aug 15, 2019 . 1 changed file with 37 additions and 38 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,49 +6,48 @@ Xmodmap configuration that swaps <kbd>ctrl</kbd> and <kbd>cmd</kbd> keys to achi 1. Open or create `.Xmodmap` file in your `~/` folder. 2. Paste the following code into that file: ``` ! -*- coding: utf-8 -*- ! macOS-like key mapping ! default mapping ! keycode 37 = Control_L NoSymbol Control_L ! keycode 64 = Alt_L Meta_L Alt_L Meta_L ! keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 105 = Control_R NoSymbol Control_R ! keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 133 = Super_L NoSymbol Super_L ! keycode 134 = Super_R NoSymbol Super_R ! keycode 204 = NoSymbol Alt_L NoSymbol Alt_L ! keycode 206 = NoSymbol Super_L NoSymbol Super_L ! moddified mapping clear control clear mod1 clear mod4 clear mod5 keycode 37 = Super_L NoSymbol Super_L keycode 108 = Alt_R NoSymbol Alt_R keycode 133 = Control_L NoSymbol Control_L keycode 134 = Control_R NoSymbol Control_R add control = Control_L Control_R add mod1 = Alt_L Meta_L add mod4 = Super_L Super_R add mod5 = Alt_R Meta_R ``` 3. Run the following command in terminal and compare your values with the *default mapping* values in provided `.Xmodmap` config: ``` xmodmap -pke | grep -P '(Control|Super|Alt|Level3)' ``` - *If your keycodes values are different, you will need to remap these by yourself. You can run `xmodmap -pke` to print out all keycodes or use `xev` utility ([help](https://wiki.archlinux.org/index.php/Keyboard_input#Identifying_keycodes_in_Xorg)).* 4. Apply the changes: ``` xmodmap ~/.Xmodmap ``` ## Limitations - This modification does not replicate the macOS terminal controls (i.e. <kbd>ctrl</kbd>+<kbd>c</kbd> to cancel). A workaround for this limitation is possible with [AutoKey scripts](https://github.com/pryetranka/autokey-macos). -
bartosjiri revised this gist
Aug 15, 2019 . 1 changed file with 36 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,48 +7,48 @@ Xmodmap configuration that swaps <kbd>ctrl</kbd> and <kbd>cmd</kbd> keys to achi 2. Paste the following code into that file: ``` ! -*- coding: utf-8 -*- ! macOS-like key mapping ! default mapping ! keycode 37 = Control_L NoSymbol Control_L ! keycode 64 = Alt_L Meta_L Alt_L Meta_L ! keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 105 = Control_R NoSymbol Control_R ! keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 133 = Super_L NoSymbol Super_L ! keycode 134 = Super_R NoSymbol Super_R ! keycode 204 = NoSymbol Alt_L NoSymbol Alt_L ! keycode 206 = NoSymbol Super_L NoSymbol Super_L ! moddified mapping clear control clear mod1 clear mod4 clear mod5 keycode 37 = Super_L NoSymbol Super_L keycode 108 = Alt_R NoSymbol Alt_R keycode 133 = Control_L NoSymbol Control_L keycode 134 = Control_R NoSymbol Control_R add control = Control_L Control_R add mod1 = Alt_L Meta_L add mod4 = Super_L Super_R add mod5 = Alt_R Meta_R ``` 3. Run the following command in terminal and compare your values with the *default mapping* values in provided `.Xmodmap` config: ``` xmodmap -pke | grep -P '(Control|Super|Alt|Level3)' ``` - *If your keycodes values are different, you will need to remap these by yourself. You can run `xmodmap -pke` to print out all keycodes or use `xev` utility ([help](https://wiki.archlinux.org/index.php/Keyboard_input#Identifying_keycodes_in_Xorg)).* 4. Apply the changes: ``` xmodmap ~/.Xmodmap ``` ## Limitations - This modification does not replicate the macOS terminal controls (i.e. <kbd>ctrl</kbd>+<kbd>c</kbd> to cancel). A workaround for this limitation is possible with [AutoKey scripts](https://github.com/pryetranka/autokey-macos). -
bartosjiri created this gist
May 25, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ # Xmodmap macOS configuration Xmodmap configuration that swaps <kbd>ctrl</kbd> and <kbd>cmd</kbd> keys to achieve macOS-like behaviour. ## Installation 1. Open or create `.Xmodmap` file in your `~/` folder. 2. Paste the following code into that file: ``` ! -*- coding: utf-8 -*- ! macOS-like key mapping ! default mapping ! keycode 37 = Control_L NoSymbol Control_L ! keycode 64 = Alt_L Meta_L Alt_L Meta_L ! keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 105 = Control_R NoSymbol Control_R ! keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift ! keycode 133 = Super_L NoSymbol Super_L ! keycode 134 = Super_R NoSymbol Super_R ! keycode 204 = NoSymbol Alt_L NoSymbol Alt_L ! keycode 206 = NoSymbol Super_L NoSymbol Super_L ! moddified mapping clear control clear mod1 clear mod4 clear mod5 keycode 37 = Super_L NoSymbol Super_L keycode 108 = Alt_R NoSymbol Alt_R keycode 133 = Control_L NoSymbol Control_L keycode 134 = Control_R NoSymbol Control_R add control = Control_L Control_R add mod1 = Alt_L Meta_L add mod4 = Super_L Super_R add mod5 = Alt_R Meta_R ``` 3. Run the following command in terminal and compare your values with the *default mapping* values in provided `.Xmodmap` config: ``` xmodmap -pke | grep -P '(Control|Super|Alt|Level3)' ``` - *If your keycodes values are different, you will need to remap these by yourself. You can run `xmodmap -pke` to print out all keycodes or use `xev` utility ([help](https://wiki.archlinux.org/index.php/Keyboard_input#Identifying_keycodes_in_Xorg)).* 4. Apply the changes: ``` xmodmap ~/.Xmodmap ``` ## Limitations - This modification does not replicate the macOS terminal controls (i.e. <kbd>ctrl</kbd>+<kbd>c</kbd> to cancel). A workaround for this limitation is possible with [AutoKey scripts](https://github.com/pryetranka/autokey-macos).