Announcing keyspk!

Barry Pollock barryp at hurontel.on.ca
Sat May 6 21:44:52 EDT 2000


		A Program in perl to monipulate the linux keymap

See the README_07 file included with this message. keyspk is a menu driven
program that allows you to swap speakup commands, create macros using the
altgr /ins  key as a shift key.
You can transfer speakup commands to the keyboard.  It is available at
http://www.hurontel.on.ca/~barryp
The file is called 
keyspk_07.tar.gz
It also contains another program menu which allows you to run mysql
from
ftp.mysql.com
www.mysql.com
	keyspk requires no additional modules. menu requires several
modules.

	See the file README_07 for more information.
Barry
-------------- next part --------------
See the files COPYING and COPYHEADER included with this package for information about the GPL.

The files keyspk and menu must be made executable by typing: 
chmod 755 keyspk
chmod 755 menu
if they are not already  executable.

When you execute them, each file writes itself to keyspk.pl and menu.pl
whith your settings.

keyspk

requires no additional modules from CPAN.
You should have a keymap file file to play with.
defkeymap.map
is provided along with speakupmap which is NOT!!! intended to be a copy
of speakupmap.map which is part of the speakup package from
ftp://braille.uwo.on.ca
www.braille.uwo.ca

differences between speakupmap and speakupmap.map:

1:  the altger is mapped to 100

2:  the number pad wworkes in its shifted state, the numlock key is still
	disabled.

3:  Some macros are appended starting at line 320.

The program loadkeys is required so you can load your changed keymap file. When keyspk starts you are asked for the name of a keymap file.
The program looks for it in the current directory.

type:

keyspk
speakupmap

then keyspk searches your path for loadkeys
if it finds it,
you are asked for a path for your output files.
Otherwise, you will have to give the program the path for loadkeys.
Include the trailing / at the end of the path statement.
Make the path absolute so you can place keyspk.pl in a directory in your path.
you can continue running keyspk or run the new
program keyspk.pl which does not ask these questions. If you use keyspk
you will be asked to display help which is simply executing the 
   ?  help
command from the menu when it first starts. You are not asked for help from
keyspk.pl.

	You can type quit or QUIT at any prompt to exit the program.
You may also terminate the program with Q or q from the menu.

	The program loads the keymap file you selected and you are ready to go.


here is a copy of the menu.
print <<EOF;
			$0 Menu

   ?  help                              3  send a file to loadkeys
   )    check a file                    (  change user path for files
   a  add a macro to $keymap           b  save the capture file to disk
   c  change speakup keys              d  delete speakup key copied to keyboard
   k  environment variables            l  new keymap file for loadkeyss
   m  this menu                        n  view the capture array
   o  execute a capture line           p  toggle case conversion
      q  quit the program              r  restore speakup defaults
   s  speakup default key assignments  t  transfer a speakup command to keyboard
   u  change loadkeys parameters       v  view macros and transfered keys
   w  write and send file to loadkeys  x  remove a stringmacro
   y  toggle loadkeys parameters
EOF

Once you get a > prompt,
you are ready to go:
simply type A or a and press the enter key to terminate the input.
you are asked for a printable character to be used with the altger key (the
right alt key) and / or the 0 or insert key on the number pad if you are 
using speakup. It is mapped to the insert or 0 on the number pad.
The altger key is mapped to the insert or 0 key on the number pad.
The program checks your key: comma ',' is the higest value allowed.
so wee will simply press:
a
or
A
You will be asked for your macro which you can type in:
ls |more

press thee enter key twice to terminate the macro with a blank line.
the program will then append 3 lines to your macro file when you write it to 
disk with the w command.

the first line is a comment line which starts
# keyspk ins-a
the next line is the call to that key that we created.
the third line is the string for the macro.
If the program finds the key you chose in the file, you are asked
for a new macro key. 
The commands are sent directly to loadkeys via the pipe so you can use the w 
command to write a new file. When you choose a character, it is
converted to lower case.
Now that we are at the > prompt, you can press the key ins-a.
The line appears and you get an invalid command from the menu program because
the program only uses single character commands.


What happens if I want to erace a macro?

	The v command list all altgr || ins commands mapped to the keyboard.
The keypad ins commands are skipped. You may press q and then enter to 
terminate the command.

The x command willl allow you to remove macros. The program asks you for a key and it 
searches for a macro that the program created.
if You have created any macros and you want them to be ignored, Delete the
lines that begin with :
`# keyspk

You should use the w command to write your table before trying to delete any-
thing. The program appends lines in order to insert commands into its array.You can switch to another session and try out your commands.
Once you are satisfied you can write the file to disk. You can use the l command
to load a keymap file.

	The u command allows you to change options for loadkeys.
-v is the default parameter.

The y command allows you to toggle the loadkeys parameters. Parameters are 
turned off for the w command. Your setting returns upon completion of the
w write to disk command.

	keyspk has a c command that allows you to swap speakupcommands mapped
to the number pad. You are asked for a two character name for the key.
k or i preceed any of the other choices. i represents the ins key on the
number pad. k represents a keypad key (unshifted). The keys are represented by
number as: k2 i3 kr (num return)  ks (num plus) km (num minus. The system
converts them to lower case. You may use kh or k7 or ip or i9  kku or k8  
i- or im covers the top row (out of order) to keep you guessing.

	When you type a two letter key, the system looks it up and asks for a
second key, which the system exchanges with the first key you type. You can
continue until you have completed your changes.

	The r command tries to restore the original defaults from keys 71..96.

	The s command lysts the speakup default commands.

The t command allows you to copy a speakup command to the keyboard. It asks for a two
letter command and then a printable key, `.' `>' `/' `?' `space', are not 
allowed. The command is inserted in the file at the key requested.

	The w command writes a file to disk and sends it to loadkeys.

The x command allows you to remove a macro that you created.

The d command allows you to delete a speakup command that you transfered to
the keyboard. You are asked for the two character speakup key that represents
the key on the number pad. You are then asked for the character to delete.

Commands are saved in the capture array.
You can save it to disk with the b command. You can either create or
append files. The program should have a complete file as its default keylmap
file.

The rest of the menu is described in the file manual.txt.

menu

menu ||  menu.pl go through a similar startup sequence as keyspk and the created 
file keyspk.pl
Menu requires several modules ffrom CPAN.
Data-Showable
Data-Dumper
DBI
Msql-Mysql-modules
mysql from www.mysql.com or ftp.mysul.com.
must be up and running. It should be installed before the modules.
Be sure to load the modules in the order listed.
This  means that mysql.server has been executed after you have 
initialized the databases with mysql_install_db
You can get a binary or source build. The manual is huge so I am going tto
hope that you were successful in installing mysql and the modules.
menu asks for your mysql user name (up to 16 characters) 
if you ar not loged as root you will also be asked that the super user.s name is
root because when mysql is first loaded there is no password required and root
is the only user in the database which is called mysql

You will be asked for a database which is mysql or test. 
test is an empty database.
the program then asks for a user path so that it can write menu.pl

then a brief description is given as to finding .my.cnf which is the configura-
tion file for you. Then you are asked if you would like to display help.
after which, you are given a list of settings and the program tries to open the
socket to the mysql monitor which is a daemon.

if the modules have not been loaded, the program will exit because the socket
will cause a major error  and the program will terminate. 
remember that the builds are different in the binary and source versions.
/usr/local/bin is the location of the binary files.
mysql.server and safe_mysql or whatever it calls are located in different places.
Be sure to check the installlation section of the manual to find the files.
here is a copy of the menu.

print <<EOF;
   ?  help                             -  toggle screen and mysql output to file
   {  delete a record                  )  check the statistics of a file  
   }  set mysql parameters(pipe line)  ,  toggle display of mysql output sql
   [  drop a field                     (  change user path for files
   ]  toggle mysql parameters          *  invert a mysql query(not)
   1  create a field cryteria list     2  execute a field cryteria list
   3  send a file directly to mysql    4  set mysql permissions
   5  display a file                   6  send a | delimited file to mysql
   7  export | delimited data to file  8  toggle between pipe line and socket
   9  convert dbf text files to mysql  0  toggle explain in searches
   a  add a record                     b  save the capture file to disk
   c  sql reserve words                d  describe a table
   e  multi field select      f  choose fields
   g  optimize a table                 h  add an AUTO_INCREMENT field
   i  create a database directory      j  toggle distinct in searches
   k  environment variables            l  list databases
   m  this menu                        n  create a new table
   o  execute a capture line           p  toggle case conversion
   q  query all fields                 r  replace a record
   s  open a database                  t  list the tables in the database
   u  update a table                   v  view the capture array
   w  count the records in a table     x  type a command 254 chars per line
   y  drop a table                     z  dump a database or table to file
EOF


More information about the Speakup mailing list