Compare commits
46 Commits
old-master
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
998cc7ba6c | 6 years ago |
|
|
a34d6bae27 | 8 years ago |
|
|
3cc6e1eb8c | 8 years ago |
|
|
5f9ea17074 | 8 years ago |
|
|
791057b8af | 8 years ago |
|
|
97f79a3ec8 | 9 years ago |
|
|
6ded5b453b | 9 years ago |
|
|
99dda44922 | 9 years ago |
|
|
d2a9bcb1cc | 9 years ago |
|
|
d8dbbf8a25 | 9 years ago |
|
|
6901647283 | 9 years ago |
|
|
48171b2443 | 9 years ago |
|
|
ac6e3723f5 | 9 years ago |
|
|
6331193ef0 | 9 years ago |
|
|
853ca153fe | 9 years ago |
|
|
ccf79e6118 | 9 years ago |
|
|
5481a17e6b | 9 years ago |
|
|
aa3316795e | 9 years ago |
|
|
8d8e95e179 | 10 years ago |
|
|
958e3c7c8e | 10 years ago |
|
|
7fca36453e | 11 years ago |
|
|
7657ed7a65 | 11 years ago |
|
|
c052d248b4 | 11 years ago |
|
|
f69c5a3f2b | 11 years ago |
|
|
f3802fc086 | 11 years ago |
|
|
6d74db30c2 | 11 years ago |
|
|
9bb6416fa3 | 11 years ago |
|
|
a55e3e90cd | 11 years ago |
|
|
84e976c167 | 11 years ago |
|
|
88f933ac5a | 11 years ago |
|
|
59db9c6846 | 11 years ago |
|
|
c01ef4f2cf | 12 years ago |
|
|
d4ae3d74f6 | 12 years ago |
|
|
8dc7b033bf | 12 years ago |
|
|
664a292d41 | 12 years ago |
|
|
28fa283290 | 12 years ago |
|
|
813713a0a9 | 12 years ago |
|
|
c8b4ec9b19 | 12 years ago |
|
|
3410230008 | 12 years ago |
|
|
f1c9869083 | 12 years ago |
|
|
eeb66320bb | 12 years ago |
|
|
5555d661ce | 12 years ago |
|
|
d5b4bbdee0 | 12 years ago |
|
|
a58beb5569 | 13 years ago |
|
|
82014c8436 | 13 years ago |
|
|
51840b931e | 13 years ago |
4 changed files with 292 additions and 70 deletions
@ -0,0 +1,96 @@ |
||||
.TH XCAPE 1 2017-07-03 "John Hill" "xcape Manual" |
||||
|
||||
.SH NAME |
||||
xcape \- use a modifier key as another key |
||||
|
||||
.SH SYNOPSIS |
||||
.B xcape |
||||
[\fB-d\fR] |
||||
[\fB-f\fR] |
||||
[\fB-t\fR \fItimeout\fR] |
||||
[\fB-e\fR \fImap-expression\fR] |
||||
|
||||
.SH DESCRIPTION |
||||
\fBxcape\fR allows a modifier key to be used as another key when it is pressed |
||||
and released on its own. The default behaviour is to generate the \fIEscape\fR |
||||
key in place of \fIControl_L\fR (Left Control). |
||||
|
||||
.SH OPTIONS |
||||
.TP |
||||
.BR \-d |
||||
Debug mode. Will run as a foreground process and print debug information. |
||||
.TP |
||||
.BR \-f |
||||
Foreground mode. Will run as a foreground process. |
||||
.TP |
||||
.BR \-t " " \fItimeout\fR |
||||
Give a \fItimeout\fR in milliseconds. If you hold a key longer than |
||||
\fItimeout\fR a key event will not be generated. |
||||
.TP |
||||
.BR \-e " " \fImap-expression\fR |
||||
Use \fImap-expression\fR as the expression(s). |
||||
|
||||
.SH EXPRESSION SYNTAX |
||||
Expression syntax is \'\fBModKey\fR=\fBKey\fR[|\fBOtherKey\fR]\'. Multiple |
||||
expressions can be passed, delimited by semi-colons (;). |
||||
.PP |
||||
A list of keysyms can be found in the header file <\fIX11/keysymdef.h\fR> |
||||
(without the \fIXK_\fR prefix). |
||||
.PP |
||||
Note that shifted keys must be specified as a shift key followed by the key to |
||||
be pressed rather than the actual name of the character. For example to |
||||
generate "\fI{\fR" the expression |
||||
\'\fIModKey\fR=\fIShift_L\fR|\fIbracketleft\fR\' could be used |
||||
(assuming that you have a key with \'{\' above \'[\'). |
||||
.PP |
||||
You can also specify \fBModKey\fR in decimal (prefix \fI#\fR), octal |
||||
(\fI#0\fR), or hexadecimal (\fI#0x\fR). It will be interpreted as a keycode |
||||
unless no corresponding key name is |
||||
found. |
||||
|
||||
.SH EXAMPLES |
||||
.PP |
||||
Make Left Shift generate Escape when pressed and released on it's own, and Left |
||||
Control generate Ctrl\-O combination when pressed and released on it's own: |
||||
.RS |
||||
\fBxcape\fR \fB-e\fR '\fIShift_L\fR=\fIEscape\fR;\fIControl_L\fR=\fIControl_L\fR|\fIO\fR' |
||||
.RE |
||||
.PP |
||||
In conjugation with xmodmap it is possible to make an ordinary key act as an |
||||
extra modifier. First map the key to the modifier with xmodmap and then the |
||||
modifier back to the key with \fBxcape\fR. As an example, we can make the space |
||||
bar work as an additional ctrl key when held with the following sequence of |
||||
commands: |
||||
.PP |
||||
First, map an unused modifier's keysym to the spacebar's keycode and make it a |
||||
control modifier. It needs to be an existing key so that emacs won't spazz out |
||||
when you press it. Hyper_L is a good candidate. |
||||
.PP |
||||
.RS |
||||
.nf |
||||
\fBspare_modifier\fR="\fIHyper_L\fR" |
||||
\fBxmodmap\fR \fB-e\fR "\fBkeycode\fR \fI65\fR = \fI$spare_modifier\fR" |
||||
\fBxmodmap\fR \fB-e\fR "\fBremove\fR \fImod4\fR = \fI$spare_modifier\fR" |
||||
# hyper_l is mod4 by default |
||||
\fBxmodmap\fR \fB-e\fR "\fBadd\fR \fIControl\fR = \fI$spare_modifier\fR" |
||||
.fi |
||||
.RE |
||||
.PP |
||||
Next, map space to an unused keycode (to keep it around for \fBxcape\fR to use). |
||||
.PP |
||||
.RS |
||||
\fBxmodmap\fR \fR-e\fR "\fBkeycode\fR \fIany\fR = \fIspace\fR" |
||||
.RE |
||||
.PP |
||||
Finally use \fBxcape\fR to cause the space bar to generate a space when tapped. |
||||
.PP |
||||
.RS |
||||
\fBxcape\fR \fB-e\fR "\fI$spare_modifier\fR=\fIspace\fR" |
||||
.RE |
||||
|
||||
.SH SEE ALSO |
||||
\fBxmodmap\fR(1), \fBxev\fR(1) |
||||
|
||||
.SH AUTHOR |
||||
\fBxcape\fR was written by Albin Olsson |
||||
(albin dot olsson at gmail dot com) |
||||
Loading…
Reference in new issue