This is KEYMACS, a replacement for the Agenda VR3 keyboard application.
It should also compile and run without problems in any machine running
X windows and with FlTk libraries.
Enhancements to the original keyboard application
- Any number of different layouts of any size. The special "layout" key loads
a new layout from flash.
- Macros. The macro keys send a series of keystrokes instead of a single one. It can
be programmed in the .keyboard file or dinamically using the special "record" key.
- Internal support to send arbitrary X11 keysyms, with no need to use the xmodmap application.
- Allows mixing HWR panels with standard keys.
- Support for "merlin"
recognition engine,
with very flexible stroke (re)definition. Scribble writepads still supported.
- International characters using merlin recognition engine.
- Launch an application pressing a key.
- Send keystrokes resulting from execution of an external command. Instead of
typing the date, you
can define a key that calls the external command "date" and keymacs send the keystrokes to type
the result into the application you are using.
- Support for most common keys in typical 101-key PC keyboards (arrows, home, end, etc.)
Version 1.00 binaries:
Due to a bug in the Agenda window manager: vrwm, changing the size of
the layouts results in the new keymacs window being wrongly placed. The
problem can be circumvented by adding a 0.5 seconds delay when changing
layouts. If you can use the patched vrwm,
switching layouts is much
faster using the binaries without the delay.
Also precompiled binaries are provided with or without support for the
HWR engines.
Data files:
(scribble strokes should be included in your rootdisk).
Installation instructions:
(without reflashing the rootdisk)
- Copy the binary to /usr/local/bin and decompress the
keyboard layouts to /etc/keymacs/layouts.
- If you have a binary with support for merlin recognition engine,
decompress the merlin strokes to /etc/keymacs/merlin-samples.
If you want the full (plain text) strokes,
and the conversion tools, download the
xmerlin-agenda sources
- Kill the keyboard application, start keymacs.
- If you want to make keymacs the default keyboard, change the link
.keyboard in /home/default/.wmx and the file
/home/default/.wmx/.startup to point to the keymacs
binary in /usr/local/bin.
If you want to use the patched vrwm without
reflashing the romdisk, it is more difficult. The vrsm binary has hard coded
the location /usr/bin/vrwm. However, if the window manager is already
running, vrsm issues a warning and all runs well. You could copy the vrwm
binary to /usr/local/bin/vrwm, and execute as root this script:
#! /bin/sh
killall X
export DISPLAY=:0
/usr/X11R6/bin/X &
/usr/local/bin/vrwm &
sleep 1
cd /home/default
exec su default -c /etc/X11/vrdm/sessions/Normal &
Note that if you execute this script from the agenda, the first
command kills the X server, together with all the X clients, including
possibly the terminal where the script is running and the script itself,
leaving the agenda unusable until reboot. To avoid this problem remember
to use "nohup <script>".
Source files:
These are the source files for keymacs V 1.00.
And here is the little patch to vrwm.
Usage
- The default initial layout is "config", it has many "layout"
keys to switch to your favorite keyboard and some macro keys, some predefined
and a few undefined that you can program with the "record" key.
- You can find here
the strokes for the scribble HWR engine.
- And this is the page with the stroke definitions
for merlin.
- Macro operation:
Press the record key and a macro key for entering the
recording mode. Events generated by normal keys or HWR strokes are
stored in the macro and don't generate X11 events. Press the record
key again to exit the recording mode. Pressing the macro key when
not in recording mode plays its stored macro.
Writing new layouts:
The layout files are written in xml language and should be easy to understand.
This is, for example the config layout distributed with keymacs 1.00:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<vr_keyboard w="160" h="55">
<layer x="0" y="0" uw="20" uh="14">\
<key value="label" svalue="Layouts:" w="190" />
<key value="layout" svalue="fullqwerty" w="210" />
<br />
<key value="alpha" />
<key value="numeric" />
<key value="international" />
<key value="writepad" />
<br />
<key value="layout" name="minhwr" w="155" />
<key value="layout" svalue="lscfg" w="115" />
<key value="layout" name="merlin" w="133" />
<br />
<key value="done" w="130" />
<key value="layout" name="mv" w="80" />
<key value="layout" name="remctl" w="190" />
<br />
</layer>
<layer x="80" y="0" uw="20" uh="14">
<key value="label" name="Launch:" w="170"/>
<key value="exec" name="Term" file="/usr/X11R6/bin/rxvt" w="115"/>
<key value="exec" name="LPad" file="/usr/bin/launchpad" w="115"/>
<br />
<key value="label" name="Macros:" w="200" />
<key value="macro" name="1" index="1" w="50"/>
<key value="macro" name="2" index="2" w="50"/>
<key value="macro" name="3" index="3" w="50"/>
<key value="macro" name="4" index="4" w="50"/>
<br />
<key value="macro" name="cut" index="20" w="80">
<keysym value="XK_x" control="1" alt="0" />
</key>
<key value="macro" name="paste" index="21" w="120">
<keysym value="XK_v" control="1" />
</key>
<key value="macro" name="exit" index="22">
<string value="exit" />
<keysym value="XK_Return"/>
</key>
<key value="record" />
<br />
<key value="exec" name="date" command="date +'%a, %d %b %Y'" />
<key value="exec" name="time" command="date +%T" />
<key value="layout" name="About" w="200" />
<br />
</layer>
</vr_keyboard>
- The first line is just the heading.
- The second one define the size of the keyboard. It is always
located at the lower right position.
- With the "layer" keyword you can make groups of keys,
x and y define the position of the layer relative to the keyboard
window, uw and uh define the default width and height of the keys contained
in the layer.
- The "label" type keys do nothing, they just are there, showing the
"svalue" as labels. The "w" qualifier is used to change the default
width of the key, and is interpreted as the percentage of the default
width that should be used.
- The "layout" type keys change the keyboard layout. When you click
the key, the file named after the "svalue" field (with .keyboard extension)
is searched in the /etc/keymacs/layouts directory and loaded.
- The "<br />"is used to start another row of keys, inside the
current layer.
- The keys "alpha", "numeric", "international" and "writepad" are just
special cases of layout keys, they are supported for compatibility with
the original keyboard application.
- The "done" key kills keymacs. It may be useful to free memory or to
re-read the merlin stroke definitions. Unlike the keyboard layouts, the
merlin stroke definitions are read once, the first time that a layout
using a merlin writepad is called. This means that if you modify the
stroke definitions, you will have to kill and restart keymacs.
- The "exec" key, with the "file" parameter is used to start applications,
it works just as the icons in launchpad.
- The macro keys have an associated index in the range 1-30. They
can have a "pre-recorded" macro, as in the "exit" example. In that
case, keymacs sends the strokes e, x, i, t and <Enter>. The macro
definition can contain an arbitrary number of "string" and "keysym" definitions.
You can find the names for the keysyms in the X11 sources, in the
file keysymdef.h.
- The "record" key is used for redefining macros.
- The "exec" key, with the "command" parameter, executes the indicated
external command, takes the first line of the output, and send the
corresponding keystrokes to whatever application happens to have the
focus at that time.
- The "repeat" key (not in this layout) send again the last key sent,
including the modifier state.
- The "config" key is another special layout key, that loads the
default layout: config.keyboard.
- You can find examples of some useful keys (such as "e", "a" and "d")
in other layout files.
The set of layouts provided with keymacs 1.00 include:
- config.keyboard: contains some macros and layout keys to
switch to another layout.
- About.keyboard: just an example of many useless label keys.
- [Aiwa|DTV|Grtv|JVC_Cam|P_VCR].keyboard: examples on using
keymacs as remote control. These layouts contain "exec" keys
that execute the external command rc, with different parameters.
- remctl.keyboard: used to switch between remote controls.
- [alpha|numeric|international|scribble].keyboard: slightly modified
versions of the original agenda layouts.
- [writepad|merlin].keyboard: two variants using merlin writepads.
- fitaly.keyboard: a 5 row keyboard designed for fast typing
with one finger.
- fullqwerty.keyboard: almost all keys you need.
- spanish.keyboard: a variation of the fullqwerty.
- minhwr.keyboard: minimalistic HWR using merlin.
- mv.keyboard: one-line keyboard with Home, End and arrows.
And these ones for the agenda in landscape mode:
- lscfg.keyboard: launch some applications, switch to other
landscape layouts.
- launch+qwerty: fullqwerty + some keys for launching applications.
- lmhwr: small merlin writepad and some standard keys.
- mini: just one line to replace the (not-easily-working-in-landscape-mode) silkscreen buttons.
- qwerty+hwr: fullqwerty + full merlin writepad.
Changes
- Support for qualifier --show. Useful for showing the keyboard
on application request. (--hide already supported).
- Support for "swmb" (switch mouse button) key. Change the
button reported by X11 when the stylus touch the screen. Useful
for X11 style copy and paste with the "mouse".
- Somewhat simplified set of layouts.
Binaries
Data files:
Source files:
keymacs-1.01.tar.gz
Back to my agenda page.
Visits since 2002-01-20: ...4046.