XKEYWRAP(1)

NAME
XKeyWrap - Record and play key sequence.

SYNOPSIS
xkeywrap [XKeyWrap's options] [-x Application [Application's options...]]

DESCRIPTION
XKeyWrap is a wrapper of key sequence between keyboard and an application (ex.emacs). XKeyWrap can record and play key sequence in real time. And XKeyWrap can send key sequence to an application on other X server over the network.

RESOURCES
You can use all of the standard X-Toolkit resources.

OPTIONS
You can use all of the standard X-Toolkit options.

-display [displayname]
    This option specifies the name of the X server to use.

-geometry [+X+Y]
    This option specifies the placement of the window on the screen.

-name [name]
    This option specifies the name of the application.

-background [color], -bg [color]
    This option specifies background color of the window.

-h, -help
    Output help message.

-readme
    Output README for informations and examples about using XKeyWrap.

-copyright
    Output COPYRIGHT of XKeyWrap.

-p, -play
    XKeyWrap starts playing key sequence at start.

-r, -repeat
    Set auto repeat mode at start.

-rec, -record
    XKeyWrap starts recording key sequence at start.

-pause
    XKeyWrap is paused at start.

-q, -quit
    XKeyWrap exits when child process exits. And Child process exits when XKeyWrap exits.

-f, -file [filename]
    This option specifies file to save and load key sequence.

-s, -speed [speed]
    This option specifies speed to play key sequence from 0 to 9. Default speed is 5.

-output-display [displayname]
    This option specifies the display to send key sequence.

-output-window [windowid]
    This option specifies the window to send key sequence.

-x [Application [Application options...]]
    An application starts as child process of XKeyWrap and XKeyWrap is connected to the application and send key sequence to it. (Ex. xkeywrap -x emacs sample.txt)

MENU

Select
    Select the window to output key sequence. Move the mouse pointer to the window and click left button on the window.

Parent
    Change the window to output key sequence to the parent of the window.

Child
    Change the window to output key sequence to one of the children of the window.

Next
    Change the window to output key sequence to other child. This menu is selected next to selecting Child menu.

Clear
    Clear the recorded key sequence data.

Record
    Start recording key sequence from the keyboard. If key sequence data exists, XKeyWrap add key sequence to the start of the old key sequence data. If you select this menu while recording, XKeyWrap adds key sequence to the end of the old key sequence data. If you select this menu while playing, you can insert key sequence into the old key sequence data.

Stop
    Stop recording and playing.

Play
    Play the recorded key sequence in real time. If you select this menu while playing, XKeyWrap increases the times of playing.

Pause
    Pause recording or playing.

Repeat
    Auto repeating at playing the recorded key sequence.

+   Change the speed to play key sequence faster.

-   Change the speed to play key sequence more slow.

Save
    Save the recorded key sequence data to file.

Load
    Load the key sequence data from file.

Quit
    XKeyWrap exits.

EXAMPLES

% xkeywrap
    - XKeyWrap starts.
    - Click Select menu of XKeyWrap and click on the window to send key sequence.
    - Key inputs to XKeyWrap are sent to the window.

% xkeywrap -x emacs
    - Emacs and XKeyWrap start.
    - You put the mouse pointer on XKeyWrap and input some words.
    - The words are sent to emacs.
    - You can record and play the key sequence by XKeyWrap.

% xkeywrap -f example.dat -x emacs -geometry 80x20 text.txt
    - Emacs opens file "text.txt" and starts with 80x20 window.
    - XKeyWrap starts. If example.dat exists, XKeyWrap reads it.
    - If you select Play menu, XKeyWrap plays it.
    - If you select Save menu, XKeyWrap saves key sequence to file "example.dat".

% xkeywrap -display wrongdisp:0 -output-display gooddisp:0
    - XKeyWrap starts on "wrongdisp".
    - Click Select menu of XKeyWrap and click on the window on "gooddisp".
    - Key inputs to XKeyWrap are sent to the window on "gooddisp". (XKeyWrap can send key sequence to an application running on other X server over the network)

% xkeywrap -f example.dat -display wrongdisp:0 -output-display gooddisp:0 -x emacs -display gooddisp:0 -geometry 80x20 text.txt
    - Emacs starts on "gooddisp".
    - XKeyWrap starts on "wrongdisp".
    - XKeyWrap search a new window on "gooddisp", and find emacs on it.
    - Key inputs to XKeyWrap are sent to emacs. (XKeyWrap can send key sequence to an application running on other X server over the network)

Q AND A

Q. I cannot connect XKeyWrap to XTerm (or other application).
    XTerm do not permit to receive event from outside as default.
    If you want to use XTerm with XKeyWrap, you have to set allowSendEvents resource. add this line to .Xdefaults.
    XTerm*allowSendEvents: true
    or
    xterm*allowSendEvents: true
    But, if allowSendEvent is true, XTerm receives all events from outside, and everyone can operate XTerm on your machine from the machine which is permitted to connect to the X server of your machine by xhost(1). If you do it, be very careful of setting xhost(1).
    If you want to permit to connect XKeyWrap to all applications, add this line to .Xdefaults.
    *allowSendEvents: true
    But, when you do it, all X applications receives all events from outside, and everyone can operate them on your machine from the machine which is permitted to connect to the X server of your machine by xhost(1). If you do it, be very careful of setting xhost(1).

Q. I read term of Demonstration in README and try it, but it does not run correctly.
    This demonstration was recorded with Japanese 106 keyboard. If your keyboard is different from it, you can see this demonstration, but, this demonstration runs more or less curiously.

Q. Though allowSendEvents resource is set correctly, I cannot connect XKeyWrap to an application.
    Try Parent menu as below,
    first, click Select menu and select the application window.
    Second, put the mouse pointer on XKeyWrap and try to hit some keys.
    Third, if you cannot operate the application from XKeyWrap, click Parent menu some times and try to hit some keys again.

SEE ALSO
X(1)
If you want to read more informations and examples about using XKeyWrap, run XKeyWrap with -readme option.

BUGS
XKeyWrap runs more or less curiously between systems with different keyboards. (Ex. If the keyboard of your system is 101 keyboard, XKeyWrap can play the data recorded with Japanese 106 keyboard, but, more or less curiously)

AUTHOR
Programed by Sakai Hiroaki.
E-Mail : sakai@seki.ee.kagu.sut.ac.jp, hsakai@m8.people.or.jp
http://www.seki.ee.kagu.sut.ac.jp/~sakai/myfreesoft/index.html
http://hp.vector.co.jp/authors/VA014157/myfreesoft/index.html
http://www.people.or.jp/~hsakai/myfreesoft/index.html

COPYRIGHT
XKeyWrap Copyright (C) 1999-2001 Sakai Hiroaki.
All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.