[ Home
> xvkbd ]
xvkbd - virtual keyboard for X window system
[ English | Japanese ]
xvkbd is a virtual (graphical) keyboard program for X Window System
which provides facility to enter characters onto other clients (softwares)
by clicking on a keyboard displayed on the screen.
This may be used for systems without a hardware keyboard
such as kiosk terminals or handheld devices.
This program also has facility to send characters
specified as the command line option to another client.
The standard keyboard layout is based on the traditional US layout,
but it can be configured to use the different layout, such as German layout.
The default window size may be too large for systems with small screen,
but it can be configured to use smaller space (220x90 pixels, for example).
For details,
see also "How to Customize xvkbd"
and "Screen Shot" below,
and sample resoure files in the distribution.
xvkbd will work on X11R5 or X11R6.
It is tested on redhat Linux and Solaris,
and it will work also on most UNIX-like systems.
This program uses Xaw (use of Xaw3d is recommended)
and no special library is required.
When xvkbd is started, the image of a keyboard
will be displayed on the screen.
Clicking any key on the xvkbd window will send the character
to the focused window
as if the key had been actually typed with the hardware keyboard.
If you want to input upper-case alphabets
or other characters on the upper position on the keyboard,
you should click the key after selecting Shift by clicking it,
or click the key with mouse button 3 (maybe right button) or mouse button 4.
In the similar manner, if you want to input Controled characters,
you should click the key after clicking Control,
or click the key with mouse button 2 (maybe middle button).
Alt and Meta can be used in the similar manner with Control,
but there are no shortcuts with mouse buttons.
If you are using a window manager and clients
where you can set input focus by clicking mouse button on the window
(and you don't have to keep pointer in the window after that),
you can simply set input focus in the normal way
and then click keys on the xvkbd window
- the character will be sent to the selected position.
If you are using a window manager or clients
where you must keep the pointer in the input field to input from the keyboard,
or if the input focus is switched to the xvkbd window
when you clicked on the key on the xvkbd window,
you must make xvkbd to set input focus explicitly
by clicking the Focus button on the xvkbd window
and then click on the input field.
This input focus can be cleared by clicking Focus button
with mouse button 3, or simply clicking Focus button twice.
Pressing the ``xvkbd'' logo on the main keyboard
(placed near left-bottom corner in the default configuration)
will popup the main menu.
The menu contains following items:
- About...
- Show short description of this program.
- Manual...
- Launch manual page reader.
- Keypad...
-
Open a Keypad panel.
- Sun Function Keys...
-
Open a Sun function keys panel.
- Use XTEST Extension?
-
XTEST extension will be used if this entry is checked.
If this entry is set inactive,
the X server does not support XTEST extension.
- Lock Shift?
-
Toggle locking/momentary of Shift keys
- Lock Control, Alt and Meta?
-
Toggle locking/momentary of Control, Alt and Meta keys.
- Connect to Remote Display...
-
Open a panel to specify the name of a remote display to be connected,
so that following key events will be sent to windows on the remote display.
- Revert to Local Display
-
Disconnect from the remote display
so that following key events will be sent to windows on the local display.
xvkbd accept following command line options, in addition to
general options such as `-display'.
- -xsendevent
- Make xvkbd to use XSendEvent() to simulate keyboard events,
as it was in xvkbd version 1.0.
xvkbd version 1.1 and later will try to use XTEST extension instead
in the default configuration.
If XTEST extension is not supported by the X server,
xvkbd will automatically switch to this mode.
Resource `xvkbd.xtest: false' has the same function.
- -no-jump-pointer
- Make xvkbd not to jump the pointer when sending events.
In the default, xvkbd will temporary jump the pointer to the focused window,
if input focus is set explicitly via Focus button,
and XTEST extension is to be used to simulate keyboard events.
Resource `xvkbd.jumpPointer: false' has the same function.
- -modal
- Make labels on keys in the xvkbd window
to be set independently for each of four shift states,
not shifted, Shift, AltGr and Shift-AltGr.
This is useful when you want to make the xvkbd window very small.
See also "Customizing Keyboard Layout"
and sample resoure files in the distribution.
Resource `xvkbd.modalKeytop: true' has the same function.
- -geometry
- Set window geometry.
When you are attempting to set window position
with the distance from right/bottom of the screen,
please note that you must take account of size of the window border.
(If you specify `-geometry -0-0',
the window will not fit in the screen.)
This can be set by xvkbd.windowGeometry resource
(note that it is not xvkbd.geometry), too.
- -no-repeat
- Do not auto-repeat even if key is depressed long time.
If auto-repeat is enabled (this is the default),
time before start auto-repeat can be set as
`xvkbd*Repeater.initialDelay: 600',
and period of repeat can be set as
`xvkbd*Repeater.minimumDelay: 100'
(unit of there parameters are milli-seconds).
Resource `xvkbd.autoRepeat: false' has the same function.
- -no-functionkey
- Do not display function keys.
Resource `xvkbd.functionkey: false' has the same function.
- -no-keypad
- Do not display keypad.
Resource `xvkbd.keypad: false' has the same function.
- -compact
- Do not display function keys nor keypad.
Resource `xvkbd.compact: true' has the same function.
- -keypad
- Display only keypad.
This option will be ignored
if `-no-keypad' or `-compact' is specified.
Resource `xvkbd.keypadOnly: true' has the same function.
- -text string
- Send the string to the focused window
(see also `-window' option).
If this option is specified,
xvkbd will not open its window
and terminate soon after sending the string.
The string can contain:
- \r - Return
- \t - Tab
- \b - Backspace
- \e - Escape
- \d - Delete
- \S - Shift (modify the next character)
- \C - Control (modify the next character)
- \A - Alt (modify the next character)
- \M - Meta (modify the next character)
- \[keysym] - the keysym keysym
Please note that modify with ``\S'' will be ignored in many cases.
For example, ``a\Cb\ScD\CE'' will be interpreted as
a, Control-b, c, Shift-D,
and Control-Shift-E.
- -file filename
- Send the contents of the specified file to the focused window
(see also `-window' option).
If this option is specified,
xvkbd will not open its window
and terminate soon after sending the string.
- -window window
- Specify the ID
(hexadecimal value leaded with `0x', or decimal value)
or name (instance name or class name) of the window to set input focus.
If this is not specified, xvkbd will use input focus
under control of the window manager,
unless focus is specified explicitly via Focus button.
Even if this option is specified,
you can set input focus to other windows using Focus button,
or clear the input focus.
If there are two or more windows which have the name specified with this option,
the window which was found first will be selected.
- -widget widget-name
- Specify the name of the widget to set the input focus.
To use this feature, the client must support Editres protocol.
In general, this option will be used with `-window' option.
If you want to set input focus to the widget foo.bar.zot,
you can write zot, bar.zot or foo.bar.zot
as widget-name.
To avoid confusion, the widget-name should match
with a single widget of the client.
For example,
xvkbd -window xarchie -widget searchText -text "\Ca\Ckabc\r"
will enter the string ``abc'' to the ``Search Term'' field
of a xarchie window.
- -true-keypad
- If this option is specified,
xvkbd will attempt to use keysyms such as
XK_KP_1 instead of XK_1.
Resource `xvkbd.keypadKeysym: true' has the same function.
- Default
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-normal.gif
- German Layout
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-german.gif
- Swiss-German Layout
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-swissgerman.gif
- Japanese (JIS X 6004) Layout
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-jisx6004.gif
- Keyboard contains most Latin-1 characters
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-latin1.gif
- Small Keyboard (maybe suitable for PDAs)
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-small.gif
- Latest Official Release
- http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-1.6.tar.gz
- source of version 1.6 (2001-11-10), 40kB
- previous release
-
http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-1.5.tar.gz
- source of version 1.5 (2001-10-08), 39kB
http://member.nifty.ne.jp/tsato/xvkbd/xvkbd-1.4.tar.gz
- source of version 1.4 (2001-04-22), 37kB
xvkbd is distributed under the terms of the
GNU General Public License.
- untar the source in a directory,
and move to the directory
- If you wish to use genuine Xaw insead of Xaw3d,
edit Imakefile and remove (or comment-out) `#define XAW3D'.
When you are installing xvkbd (for example) in very old systems,
you may also want to remove `#define XTEST' and `#define I18N'
to disable XTEST and internationalization facility respectively.
- Run xmkmf; make install install.man
Some degree of customization of xvkbd is possible
by setting resources.
Some resources are already described above,
and resources to customizing keyboard layout are described below.
To set resources, you can:
- put them in your $HOME/.Xdfaults file, or
- load them via xrdb(1), or
- set the filename to the $XENVIRONMENT environment variable, or
- put them in application default directory as `XVkbd-suffix'
and set resource ``xvkbd.customization: -suffix'', or
- put them in application default directory as XVkbd.
Here, application default directory can be either of:
- directories specified with $XUSERFILESEACHPATH,
$XAPPLRESDIR or else $HOME environment variable
- system's application default directory specified with
$XFILESEACHPATH environment variable,
or else the directory specified when compiling the X
(e.g., /usr/lib/X11/app-defaults)
When the application default file is to be stored
in the system's application default directory,
the file must contain ``#include "XVkbd-common"''
near top of the file.
xvkbd is distributed with some sample application default files,
and they will be installed in the system's application default directory.
Size (and position) of xvkbd window can be set
by `xvkbd.windowGeometry' resource.
When making window small, you may need to choose the smaller font, too.
xvkbd.windowGeometry: 220x90
xvkbd.compact: true
xvkbd*Font: 6x12
You may also want to set:
xvkbd.modalKeytop: true
to display only the labels for the current shift state,
instead of trying to always display all of them in the small keytop.
See also XVkbd-small.ad in the xvkbd distribution.
Keys on xvkbd window can be removed by setting its width to 1.
To remove Compose key and make Shift key larger,
you can write:
xvkbd*Multi_key.width: 1
xvkbd*Shift_R.width: 75
To remove right Alt and Meta key,
you can write:
xvkbd*Alt_R.width: 1
xvkbd*Meta_R.width: 1
Layout of keys on the xvkbd window can be customized
with following resources:
- xvkbd.NormalKeys
- list of keys available when neighter of Shift and AltGr are selected
- xvkbd.ShiftKeys
- list of keys available when Shift is selected
- xvkbd.AltgrKeys
- list of keys available when AltGr is selected
- xvkbd.ShiftAltgrKeys
- list of keys available when both AltGr and Shift are selected
- xvkbd.KeyLabels
- list of labels displayed on the keys
- xvkbd.NormalKeyLabels
- list of labels displayed on the keys
when neither of Shift and AltGr are selected.
- xvkbd.ShiftKeyLabels
- list of labels displayed on the keys
when Shift is selected
- xvkbd.AltgrKeyLabels
- list of labels displayed on the keys
when AltGr is selected
- xvkbd.ShiftAltgrKeyLabels
- list of labels displayed on the keys
when both AltGr and Shift are selected
Four resources to set labels on the keys
(xvkbd.NormalKeyLabels, xvkbd.ShiftKeyLabels,
xvkbd.AltgrKeyLabels and xvkbd.ShiftAltgrKeyLabels)
will be used instead of xvkbd.KeyLabels
when xvkbd.modalKeytop resoruce is set true.
In all of those resources, each keys are separated by spaces,
and rows of keys are terminated with ` \n\'
(note that `\n' must have space before it).
Please refer XVkbd-german.ad and XVkbd-latin1.ad
in the xvkbd distribution for more about these resources.
XVkbd-german and XVkbd-latin1 will be installed
in the system's application default directory,
and setting the resource ``xvkbd.customization: -german''
will make xvkbd to use the German layout.
For another method to activate those settings, please refer
"How to Customize xvkbd" above.
Text can be assigned to each function keys
(and, actually, to most other keys).
If text is assigned to the function key,
clicking on the key will send the assigned text
instead of the function key itself.
When pointer is on a key where text is assigned,
the text will be displayed near the key.
The setting will be read from a text file
which contains text for each function keys as:
F1 text for F1
F2 text for F2
s:F1 text for Shift-F1
c:F1 text for Control-F1
m:F1 text for Meta-F1
a:F1 text for Alt-F1
The file is $HOME/.xvkbd in default,
and it can be changed by setting the filename
with xvkbd.keyFile resource.
- On XFree86, resolution switch with
Ctrl + Alt + Keypad-Plus and Ctrl + Alt + Keypad-Minus
may be simulated.
However, Ctrl + Alt + Backspace will not be simulated.
- Shift is used to decide key to be sent
and it will not used to set modifier bit when sending the event.
You can use xev command to check what is actually sent.
- If Alt or Meta is not defined as modifier,
the key can't be used as modifier.
You can use `xmodmap -pm' to check how modifiers are defined.
- FAQ - Possible Problems and Solutions
- http://member.nifty.ne.jp/tsato/xvkbd/faq.html
- Note about how to send key events
- http://member.nifty.ne.jp/tsato/xvkbd/events.html
- Version 0.1 (2000-05-13)
-
-
The first release, not announced anywhere.
- Version 0.2 (2000-09-15)
-
- Compose key is added.
In the environments where Compose key is supported,
some characters (mainly letters with accent symbol)
which can't be entered directly from keyboard
can be entered using dedicated key combinations.
- Make keyboard layout not to be disturbed when
window size if specified with -geometry option.
- Sample app-defaults file is added.
- Version 0.3 (2000-10-05)
-
- -text option can now accept some modifiers
(\S, \C, etc.) and any keysyms
(\[keysym]).
- In addition to the window ID,
-window option can now accept window name.
- New -widget option to specify the widget to set the input focus.
- Version 1.0 (2000-11-03)
-
- Keyboard layout can be now configured with resources.
See "Customizing Keyboard Layout" above,
and XVkbd-german.ad in the distribution.
- xvkbd can now send keys
with Mode_switch (AltGr) modifier,
which enables those characters in the position to be entered.
- xvkbd now support AltGr key
so that German (and some other) keyboard layout can be used.
See XVkbd-german.ad in the distribution.
- XVkbd-german and XVkbd-latin1 are included
in the distribution, which modifies keyboard layout
and put some non-ASCII keys on the xvkbd window.
- CapsLock key is supported now.
- Version 1.1 (2000-12-23)
-
- xvkbd can now use XTEST extension to simulate keyboard events.
It can still use XSendEvent(), as it was in the older release.
(thanks, Bjoern)
- Labels on keys can now be set independently for each of four shift states,
not shifted, Shift, AltGr and Shift-AltGr.
(thanks, Jim)
- -kterm option and xvkbd.kterm resource are removed.
- Version 1.2 (2001-02-18)
-
- Focus button is now placed in the main keyboard, too,
so that it will be available also in compact mode.
If you don't need it,
it can be removed by setting ``xvkbd*row5.Focus.width: 1''.
- Input focus set by Focus button can now be cleard
by clicking Focus button twice.
Clicking Focus button with mouse button 3 will
still clear the input focus, too.
- Text can now be assigned to function keys
(and, actually, to most other keys).
- It is now possible to assign keys modified with
Shift, Control, Alt and Meta on the main keyboard,
by putting `s:', `c:', `a:' and `m:'
before those keysym name when
customizing the keyboard layout.
- xvkbd now ignores SIGINT and SIGQUIT
so that it will not terminated accidently.
- Version 1.3 (2001-03-19)
-
- New app-defaults file for Swiss-German layout, XVkbd-swissgerman.ad.
(contributed from Marcel Portner)
- xvkbd now catches MappingNotify event and reload the new mapping.
This allows users to use xmodmap while xvkbd is running.
- NumLock key is supported now.
(I'd removed Print, ScrLk and Pause from keypad
- somebody need them?)
- Version 1.4 (2001-04-22)
-
- Auto-repeat didn't work
when focus was set explicitly via Focus button.
It is now fixed.
- When required keysym was not defined in the keymap table,
xvkbd will now add it on-the-fly.
This means that we don't have to add them via xmodmap.
- Keypad panel can now be popped up from the main keyboard
as a separate window.
- Sun function keys is now supported.
It can be popped up from the main keyboard as a separate window.
- Manual page is now available.
- Version 1.5 (2001-10-08)
-
- Key events can now be sent to windows on a remote display
(i.e. windows on other X servers)
- use "Connect to Remote Display..." in the main menu
to connect to remote display.
- Shift, Control, Alt and Meta can now be locked
- use "Lock Shift?" and "Lock Control, Alt and Meta?"
in the main menu.
Those initial settings can be set by
xvkbd.shiftLock and xvkbd.modifiersLock resource.
- If the first keysym for a key is an alphabet
and the second keysym is NoSymbol,
it is now interpreted as if the first keysym is lowercase alphabet
and the second keysym is uppercase alphabet.
Keymap may be defined in this way in some systems including Solaris,
and older xvkbd may not work correctly in such situation.
- Version 1.6 (2001-11-10)
-
- New `-file' option to send characters in the specified file.
(thanks, Gregory)
- New entry `Use XTEST Extension?' is added
to the main menu,
mainly to indicate the availability of the XTEST extension.
- xvkbd would crash when the window explicitly focused
via Focus button becomes was destroyed.
This problem is now fixed.
xvkbd was written by Tom Sato,
and it is distributed under the terms of the
GNU General Public License.
Please send any feedback (such as bug reports, requests or comments) to
Tom Sato <VEF00200@nifty.ne.jp>.
The latest version of this software
and more information about it may be available at
http://member.nifty.ne.jp/tsato/xvkbd/.
Release of the new version will be announced
on the Freshmeat (http://freshmeat.net),
and you can receive the announce via e-mail if you wish.
by Tom Sato,
2001-11-10