aboutsummaryrefslogtreecommitdiff
path: root/system/crikey/README.source
blob: 5748191778857e7e520467894a7c4e4857b1a87c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
http://www.shallowsky.com/software/crikey/

Usage (command-line flags)
==========================
Usage: crikey [-itxr] [-sS sleeptime] string...
Send key events, as if args was typed in whatever X window currently has focus.
Flags:
        -s seconds: sleep time before sending
        -S milliseconds: sleep time before sending
             Many window managers need a delay for focus shifting
             or to allow a modifier button to be released.
        -i: Interactive (read input from stdin)
        -t: Use XTest to send events (default)
        -x: Use XSendEvent to send events
        -r: Send events to root window (only with XSendEvent)
        -l: Show long (more detailed) help
        -d: Show debug messages

If there are multiple arguments, single spaces will be inserted between them.



Crikey input options
====================
Sample usage:

crikey -s 1 'My long string\nExtending over two lines.'

Using quotes around the string is normally recommended, to avoid problems with
your shell treating any characters specially, especially backslashes.


Special characters and syntaxes
===============================
Control characters use ^: ^A sends a Control-A
Numeric ASCII codes (decimal only): \27 sends ESC

Special codes:
\t tab, \b backspace, \n newline, \r return, \d delete, \e escape, \\ backslash

Modifier keys:
\S shift, \C control, \A alt, \M or \W for the "Windows" key. These must be
capitalized, and they only apply to the next single character, so \Aabc will
send alt-A followed by b and c with no modifier keys.

Special symbols with \( \): \(Return\) ... these are defined in
/usr/include/X11/keysymdef.h, but only those defined on your keyboard will
likely work. 


A Note on Xterm
===============
Crikey will work out of the box for most terminal emulators, but xterm blocks
events generated with XSendEvent by default. To use crikey with xterm, you have
two options:

    * Use crikey -t, to use the X Test extension instead of XSendEvent (this is now the default).
    * Add to your .Xdefaults file: XTerm*allowSendEvents: true 

Setting up Crikey in your Window Manager

The most common way to use Crikey is to bind specific crikey commands to keys
in your window manager (for instance, Shift-F12 might send a particular string).

The procedure for making key bindings is different in every window manager,
so I've moved the instructions for all the various window managers to a separate
page: Making Crikey! work on various window managers.