User Tools

Site Tools


general:linux:swap_left_shift_and_ctrl_useful_on_typematrix_keyboards
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


general:linux:swap_left_shift_and_ctrl_useful_on_typematrix_keyboards [2021/01/17 11:34] (current) – created sunkan
Line 1: Line 1:
 +[[https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control|Use setxkbmap to swap the Left Shift and Left Control]]
  
 +<code>
 +sunkan@sunkan:~$ find .xkb/ -ls
 +   265001      4 drwxr-xr-x   4 sunkan   sunkan       4096 jan 17 12:29 .xkb/
 +   265003      4 drwxr-xr-x   2 sunkan   sunkan       4096 jan 17 12:28 .xkb/keymap
 +   265014      4 -rw-r--r--   1 sunkan   sunkan        319 jan 17 12:21 .xkb/keymap/mykbd
 +   265012     16 -rw-r--r--   1 sunkan   sunkan      16080 jan 17 12:28 .xkb/keymap/mykbd.xkm
 +   265009      4 drwxr-xr-x   2 sunkan   sunkan       4096 jan 17 12:20 .xkb/symbols
 +   265013      4 -rw-r--r--   1 sunkan   sunkan        142 jan 17 12:20 .xkb/symbols/myswap
 +   265018      4 -rwxr-xr-x   1 sunkan   sunkan         69 jan 17 12:29 .xkb/set.sh
 +sunkan@sunkan:~$ 
 +</code>
 +
 +<code>
 +sunkan@sunkan:~$ cat .xkb/keymap/mykbd
 +xkb_keymap {
 +        xkb_keycodes  { include "evdev+aliases(qwerty)" };
 +        xkb_types     { include "complete"      };
 +        xkb_compat    { include "complete"      };
 +        xkb_symbols   { include "pc+us(dvorak)+se(dvorak_a5):2+se:3+inet(evdev)+ctrl(ac_ctrl)+myswap(swap_l_shift_ctrl)"        };
 +        xkb_geometry  { include "typematrix(tm2030USB-102)"     };
 +};
 +</code>
 +
 +<code>
 +sunkan@sunkan:~$ cat .xkb/symbols/myswap
 +partial modifier_keys
 +xkb_symbols "swap_l_shift_ctrl" {
 +    replace key <LCTL>  { [ Shift_L ] };
 +    replace key <LFSH> { [ Control_L ] };
 +};
 +</code>
 +
 +<code>
 +sunkan@sunkan:~$ cat .xkb/set.sh
 +#!/bin/sh
 +
 +xkbcomp -w3 -I$HOME/.xkb $HOME/.xkb/keymap/mykbd $DISPLAY
 +</code>
general/linux/swap_left_shift_and_ctrl_useful_on_typematrix_keyboards.txt · Last modified: 2021/01/17 11:34 by sunkan

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki