-
-
Notifications
You must be signed in to change notification settings - Fork 54
Customize eventKey.cfg
You can customize gesture by editing eventKey.cfg. xSwipe use "sendkey" in X11::GUITest when you swipe touchpad.
Sends keystrokes to the window that has the input focus.
The keystrokes to send are those specified in KEYS parameter. Some characters have special meaning, they are:
Modifier Keys:
^ CTRL
% ALT
+ SHIFT
# META
ALTGR
Other Keys:
~ ENTER
\n ENTER
\t TAB
( and ) MODIFIER GROUPING
{ and } QUOTE / ESCAPE CHARACTERS
Simply, one can send a text string like so:
SendKeys('Hello, how are you today?');
Parenthesis allow a modifier to work on one or more characters. For example:
SendKeys('%(f)q'); # Alt-f, then press q
SendKeys('%(fa)^(m)'); # Alt-f, Alt-a, Ctrl-m
SendKeys('+(abc)'); # Uppercase ABC using shift modifier
SendKeys('^(+(l))'); # Ctrl-Shift-l
SendKeys('+'); # Press shift
Braces are used to quote special characters, for utilizing aliased key names, or for special functionality. Multiple characters can be specified in a brace by space delimiting the entries. Characters can be repeated using a number that is space delimited after the preceeding key.
Quote Special Characters
SendKeys('{{}'); # {
SendKeys('{+}'); # +
SendKeys('{#}'); # #
You can also use QuoteStringForSendKeys (QSfSK) to perform quoting.
Aliased Key Names
SendKeys('{BAC}'); # Backspace
SendKeys('{F1 F2 F3}'); # F1, F2, F3
SendKeys('{TAB 3}'); # Press TAB 3 times
SendKeys('{SPC 3 a b c}'); # Space 3 times, a, b, c
Special Functionality
# Pause execution for 500 milliseconds
SendKeys('{PAUSE 500}');
Combinations
SendKeys('abc+(abc){TAB PAUSE 500}'); # a, b, c, A, B, C, Tab, Pause 500
SendKeys('+({a b c})'); # A, B, C
The following abbreviated key names are currently recognized within a brace set. If you don't see the desired key, you can still use the unabbreviated name for the key. If you are unsure of this name, utilize the xev (X event view) tool, press the key you want and look at the tools output for the name of that key. Names that are in the list below can be utilized regardless of case. Ones that aren't in this list are going to be case sensitive and also not abbreviated. For example, using 'xev' you will find that the name of the backspace key is BackSpace, so you could use {BackSpace} in place of {bac} if you really wanted to.
Name Action
-------------------
BAC BackSpace
BS BackSpace
BKS BackSpace
BRE Break
CAN Cancel
CAP Caps_Lock
DEL Delete
DOW Down
END End
ENT Return
ESC Escape
F1 F1
... ...
F12 F12
HEL Help
HOM Home
INS Insert
LAL Alt_L
LMA Meta_L
LCT Control_L
LEF Left
LSH Shift_L
LSK Super_L
MNU Menu
NUM Num_Lock
PGD Page_Down
PGU Page_Up
PRT Print
RAL Alt_R
RMA Meta_R
RCT Control_R
RIG Right
RSH Shift_R
RSK Super_R
SCR Scroll_Lock
SPA Space
SPC Space
TAB Tab
UP Up
zero is returned on failure, non-zero for success. For configurations (Xvfb) that don't support Alt_Left, Meta_Left is automatically used in its place.