@@ -2,7 +2,7 @@ What is it and why?
2
2
===================
3
3
4
4
This utility allows you switch keyboard groups in X Window in the most
5
- ergonomic way (in my view :).
5
+ ergonomic way (in my view :).
6
6
I think keys for switching keyboard layouts should be:
7
7
8
8
1 . Dedicated.
@@ -29,7 +29,7 @@ keys. But when you press Shift with other keys then it applied as
29
29
modifier key.
30
30
31
31
I not found out of the box solution how to setup X to use Shifts as
32
- standalone keys. Also I used two keyboards in same time (notebok internal and USB plugged)
32
+ standalone keys. Also I used two keyboards in same time (notebok internal and USB plugged)
33
33
and was need to switch layouts on both of them. So I wrote this utility.
34
34
35
35
So ` shift-shift ` has features:
@@ -38,7 +38,15 @@ So `shift-shift` has features:
38
38
* RShift pressed standalone locks X to group2 layout
39
39
* Layout switched on all keyboards simultaneously
40
40
41
- You need customize layout groups in your X config or with ` setxkbmap ` .
41
+ You need customize layout groups in your X to
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+ cconfig or with ` setxkbmap ` .
42
50
43
51
About code
44
52
==========
@@ -56,25 +64,25 @@ Install
56
64
57
65
Binding of ` evdev ` for Go used so before build you need:
58
66
59
- go get github.com/gvalkov/golang-evdev/evdev
67
+ go get github.com/gvalkov/golang-evdev/evdev
60
68
61
69
Then as usual:
62
70
63
- go build
71
+ go build
64
72
65
- Of course you need Go environment installed for build.
73
+ Of course you need Go environment installed for build.
66
74
And as program uses Xlib through cgo interface then you need ` xlib-devel `
67
75
installed.
68
76
69
77
Usage
70
78
=====
71
79
72
- $ sudo shift-shift -h
73
- Usage of shift-shift:
74
- -list=false: list all devices listened by evdev
75
- -match="keyboard": string used to match keyboard device
76
- -print=false: print pressed keys
77
- -quiet=false: be silent
80
+ $ sudo shift-shift -h
81
+ Usage of shift-shift:
82
+ -list=false: list all devices listened by evdev
83
+ -match="keyboard": string used to match keyboard device
84
+ -print=false: print pressed keys
85
+ -quiet=false: be silent
78
86
79
87
On start program find devices where name contains "keyboard" string. It assume there
80
88
are keyboard devices. You may customize this by set your own string with ` -match ` arg.
@@ -85,9 +93,13 @@ Got list of all input devices with `list` arg.
85
93
For autostart run it somewhere after X started with your account. I use ` ~/.bash_profile ` for
86
94
this.
87
95
88
- sudo pidof shift-shift >/dev/null || sudo shift-shift -quiet >/dev/null &
96
+ sudo pidof shift-shift >/dev/null || sudo shift-shift -quiet >/dev/null &
89
97
90
98
Thanks
91
99
======
92
100
93
101
Thanks to people who contributed bugfixes and improvements for ` shift-shift ` .
102
+
103
+
104
+ todo add ref to
105
+ https://github.com/nmukhachev/sway-xkb-switcher
0 commit comments