! XppKeyboard4,v 1.20 2008/08/02 09:13:28 rda Exp
! XppKeyboard4: include file for the Xpp app-defaults file (aka. resource file).
! (Actually it includes XppKeyboard which can be linked to this file)
!
! This gives a keyboard mapping which is portable, in that it only uses
! alphanumeric keys, provided 4 extended character shifts are available,
! viz., Mod5, Shift+Mod5, Mod4 and Shift+Mod4.
!
! On many recent Linux systems with a typical PC keyboard,
! the left Flying Windows key is mapped to the Super_L keysym
! which is then used as Mod4. The Alt Gr key is mapped to the
! ISO_Level3_Shift key which is used as Mod5.
!
! On less typical keyboards, e.g., laptop keyboards, you may need to
! change the keyboard mappings. You can use the programs xev and xmodmap
! to work out what to do and then use xmodmap (or the xkb system) to change
! the mapping. There are two mappings: (1) a mapping between keycodes (small
! machine-dependent numbers represing physical locations on the keyboard)
! and keysyms (numbers with symbolic names representing logical keys
! such as an ASCII equals sign or the left control key);
! (2) a mapping from keysyms to what are known as modifier keys called
! mod1, mod2, mod3, mod4 and mod5 which X Windows programs can use
! to modify the effect of a keyboard or mouse gesture.
!
! For example, a Toshiba Satellite Pro laptop has the Flying
! Windows key near the top right-hand corner of the keyboard so it is
! not very convenient to use as a modifier key. However, the keyboard
! has keys labelled "Alt" and "Alt Gr" near to the space bar.
! Experimentation with xev reveals that "Alt" has keycode
! 64 which is mapped to keysym Alt_L and "Alt Gr" has keycode 113
! which is mapped to keysym Alt_R.  xmodmap called with no parameters
! shows that Alt_L and Alt_R are both associated with modifer mod1.
! If you put the following lines into ! a file, e.g $HOME/.xmodmaprc,
! and run e.g. "xmodmap $HOME/.xmodmaprc" Alt_L and Alt_R will act
! as mod4 and mod5:
!
!	remove Mod1 = Alt_L
!	remove Mod1 = Alt_R
!	add Mod4 = Alt_L
!	add Mod5 = Alt_R
!
! PC keyboards also don't tend to have Cut/Copy/Paste/Undo keys. For reference
! the typical Motif bindings for these are "Shift+Delete"/"Control+Insert"/
! "Shift+Insert"/"Control+z" respectively. With the above xmodmap settings
! "Control" has to be the _left_ control key.
!
! The execute action allows you to set up short-cuts for character
! strings you want to execute. With no parameters it is like
! Execute Selection in the Command menu. With parameters it
! causes the parameters to be executed. There is no leading `:' or "!"
! translations that use execute below; i.e., they will work with or
! without the shift key pressed, provided they are not also menu item
! accelerators, e.g., Ctrl+r will be Edit/Redo while Ctrl+Shift+R will
! execute redo().
!
! Some of these act like menu accelerators and if you change them
! you will want to change the accelerator text settings at the end
! of this file.
!
! Mac users are recommended to use the left and right Cmd keys as
! Mod4 and Mod5 using the following xmodmap lines:
!
!	clear mod2
!	add mod4 = Meta_L
!	add mod5 = Meta_R
!
! The combinations Cmd+Shift+3 and Cmd+Shift+4 will still be preempted
! by MacOS for taking screen snapshots, so use Ctrl+Shift+3 and
! Ctrl+Shift+4 instead by changing "Mod5 Shift" to "Ctrl" on the lines
! beginning "!Mod5 Shift <Key>3" and "!Mod5 Shift <Key>4" below.
!
! UK users may also wish to add a line:
!
! !Shift <Key>3: insert-string("#")\n\
!
Xpp.textTranslations: #override \
Ctrl <Key>; : execute(";\n")\n\
Ctrl <Key>space : execute()\n\
Ctrl <Key>Return : execute()\n\
Ctrl <Key>a : select-all()\n\
Ctrl <Key>c : copy-clipboard()\n\
Ctrl <Key>d : command-line()\n\
Ctrl <Key>f : search()\n\
Ctrl <Key>g : execute("print_current_goal();\n")\n\
Ctrl <Key>h : show-hide-script()\n\
Ctrl <Key>j : show-hide-journal()\n\
Ctrl <Key>i : interrupt()\n\
Ctrl <Key>l : goto-line()\n\
Ctrl <Key>m : execute("\n")\n\
Ctrl <Key>n : execute-line()\n\
Ctrl <Key>o : script-open()\n\
Ctrl <Key>p : execute("print_status ();\n")\n\
Ctrl <Key>q : quit()\n\
Ctrl <Key>r : execute("redo ();\n")\n\
Ctrl <Key>s : script-save()\n\
Ctrl <Key>t : toggle-geometry()\n\
Ctrl <Key>u : execute("undo 1;\n")\n\
Ctrl <Key>v : paste-clipboard()\n\
Ctrl <Key>w : show-geometry()\n\
Ctrl <Key>x : cut-clipboard()\n\
Ctrl <Key>y : script-redo()\n\
Ctrl ~Shift <Key>z : script-undo()\n\
Ctrl Shift <Key>z : script-redo()\n\
!Mod5 <Key>1 : insert-string("\261")\n\
!Mod5 <Key>2 : insert-string("\262")\n\
!Mod5 <Key>3 : insert-string("\263")\n\
!Mod5 <Key>4 : insert-string("\264")\n\
!Mod5 <Key>5 : insert-string("\265")\n\
!Mod5 <Key>6 : insert-string("\266")\n\
!Mod5 <Key>7 : insert-string("\267")\n\
!Mod5 <Key>8 : insert-string("\252")\n\
!Mod5 <Key>9 : insert-string("\271")\n\
!Mod5 <Key>0 : insert-string("\260")\n\
!Mod5 <Key>q : insert-string("\363")\n\
!Mod5 <Key>w : insert-string("\254")\n\
!Mod5 <Key>e : insert-string("\256")\n\
!Mod5 <Key>r : insert-string("\257")\n\
!Mod5 <Key>t : insert-string("\364")\n\
!Mod5 <Key>y : insert-string("")\n\
!Mod5 <Key>u : insert-string("\203")\n\
!Mod5 <Key>i : insert-string("\351")\n\
!Mod5 <Key>o : insert-string("\253")\n\
!Mod5 <Key>p : insert-string("\360")\n\
!Mod5 <Key>a : insert-string("\361")\n\
!Mod5 <Key>s : insert-string("\277")\n\
!Mod5 <Key>d : insert-string("\211")\n\
!Mod5 <Key>f : insert-string("\346")\n\
!Mod5 <Key>g : insert-string("\347")\n\
!Mod5 <Key>h : insert-string("\350")\n\
!Mod5 <Key>j : insert-string("\352")\n\
!Mod5 <Key>k : insert-string("\353")\n\
!Mod5 <Key>l : insert-string("")\n\
!Mod5 <Key>z : insert-string("\372")\n\
!Mod5 <Key>x : insert-string("\270")\n\
!Mod5 <Key>c : insert-string("\326")\n\
!Mod5 <Key>v : insert-string("")\n\
!Mod5 <Key>b : insert-string("\226")\n\
!Mod5 <Key>n : insert-string("\356")\n\
!Mod5 <Key>m : insert-string("\355")\n\
!Mod5 Shift <Key>1 : insert-string("\241")\n\
!Mod5 Shift <Key>2 : insert-string("\300")\n\
!Mod5 Shift <Key>3 : insert-string("\243")\n\
!Mod5 Shift <Key>4 : insert-string("\244")\n\
!Mod5 Shift <Key>5 : insert-string("\245")\n\
!Mod5 Shift <Key>6 : insert-string("\336")\n\
!Mod5 Shift <Key>7 : insert-string("\246")\n\
!Mod5 Shift <Key>8 : insert-string("")\n\
!Mod5 Shift <Key>9 : insert-string("\250")\n\
!Mod5 Shift <Key>0 : insert-string("\251")\n\
!Mod5 Shift <Key>q : insert-string("\221")\n\
!Mod5 Shift <Key>w : insert-string("\227")\n\
!Mod5 Shift <Key>e : insert-string("\254\350\352   \256")\n\
!Mod5 Shift <Key>r : insert-string("\222")\n\
!Mod5 Shift <Key>t : insert-string("\224")\n\
!Mod5 Shift <Key>y : insert-string("\231")\n\
!Mod5 Shift <Key>i : insert-string("")\n\
!Mod5 Shift <Key>u : insert-string("\225")\n\
!Mod5 Shift <Key>o : insert-string("")\n\
!Mod5 Shift <Key>p : insert-string("\220")\n\
!Mod5 Shift <Key>a : insert-string("\201")\n\
!Mod5 Shift <Key>s : insert-string("\223")\n\
!Mod5 Shift <Key>d : insert-string("\204")\n\
!Mod5 Shift <Key>f : insert-string("\206")\n\
!Mod5 Shift <Key>g : insert-string("\207")\n\
!Mod5 Shift <Key>h : insert-string("")\n\
!Mod5 Shift <Key>j : insert-string("\212")\n\
!Mod5 Shift <Key>k : insert-string("\213")\n\
!Mod5 Shift <Key>l : insert-string("\214")\n\
!Mod5 Shift <Key>z : insert-string("\232")\n\
!Mod5 Shift <Key>x : insert-string("\230")\n\
!Mod5 Shift <Key>c : insert-string("\240")\n\
!Mod5 Shift <Key>v : insert-string("\344")\n\
!Mod5 Shift <Key>b : insert-string("\202")\n\
!Mod5 Shift <Key>n : insert-string("\216")\n\
!Mod5 Shift <Key>m : insert-string("\215")\n\
!Mod4 <Key>1 : insert-string("\255")\n\
!Mod4 <Key>2 : insert-string("\337")\n\
!Mod4 <Key>3 : insert-string("\340")\n\
!Mod4 <Key>4 : insert-string("\357")\n\
!Mod4 <Key>5 : insert-string("\317")\n\
!Mod4 <Key>6 : insert-string("\237")\n\
!Mod4 <Key>7 : insert-string("\217")\n\
!Mod4 <Key>8 : insert-string("\376")\n\
!Mod4 <Key>9 : insert-string("\236")\n\
!Mod4 <Key>0 : insert-string("\252")\n\
!Mod4 <Key>q : insert-string("\321")\n\
!Mod4 <Key>w : insert-string("\327")\n\
!Mod4 <Key>e : insert-string("\305")\n\
!Mod4 <Key>r : insert-string("\322")\n\
!Mod4 <Key>t : insert-string("\324")\n\
!Mod4 <Key>y : insert-string("\331")\n\
!Mod4 <Key>u : insert-string("\325")\n\
!Mod4 <Key>i : insert-string("\311")\n\
!Mod4 <Key>o : insert-string("\205")\n\
!Mod4 <Key>p : insert-string("\320")\n\
!Mod4 <Key>a : insert-string("\301")\n\
!Mod4 <Key>s : insert-string("\323")\n\
!Mod4 <Key>d : insert-string("\304")\n\
!Mod4 <Key>f : insert-string("\306")\n\
!Mod4 <Key>g : insert-string("\307")\n\
!Mod4 <Key>h : insert-string("\310")\n\
!Mod4 <Key>j : insert-string("\312")\n\
!Mod4 <Key>k : insert-string("\313")\n\
!Mod4 <Key>l : insert-string("\314")\n\
!Mod4 <Key>z : insert-string("\332")\n\
!Mod4 <Key>x : insert-string("\330")\n\
!Mod4 <Key>c : insert-string("\273")\n\
!Mod4 <Key>v : insert-string("\343")\n\
!Mod4 <Key>b : insert-string("\302")\n\
!Mod4 <Key>n : insert-string("\316")\n\
!Mod4 <Key>m : insert-string("\315")\n\
!Mod4 Shift <Key>1 : insert-string("\333")\n\
!Mod4 Shift <Key>2 : insert-string("\335")\n\
!Mod4 Shift <Key>3 : insert-string("\373")\n\
!Mod4 Shift <Key>4 : insert-string("\375")\n\
!Mod4 Shift <Key>5 : insert-string("\247")\n\
!Mod4 Shift <Key>6 : insert-string("\242")\n\
!Mod4 Shift <Key>7 : insert-string("\271HOLCONST")\n\
!Mod4 Shift <Key>8 : insert-string("\377")\n\
!Mod4 Shift <Key>9 : insert-string("\235")\n\
!Mod4 Shift <Key>0 : insert-string("\234")\n\
!Mod4 Shift <Key>q : insert-string("")\n\
!Mod4 Shift <Key>w : insert-string("\233-\2331")\n\
!Mod4 Shift <Key>e : insert-string("\354")\n\
!Mod4 Shift <Key>r : insert-string("\362")\n\
!Mod4 Shift <Key>t : insert-string("\272")\n\
!Mod4 Shift <Key>y : insert-string("")\n\
!Mod4 Shift <Key>u : insert-string("\233")\n\
!Mod4 Shift <Key>i : insert-string("\334")\n\
!Mod4 Shift <Key>o : insert-string("\367")\n\
!Mod4 Shift <Key>p : insert-string("\374")\n\
!Mod4 Shift <Key>a : insert-string("\341")\n\
!Mod4 Shift <Key>s : insert-string("\303")\n\
!Mod4 Shift <Key>d : insert-string("\211R")\n\
!Mod4 Shift <Key>f : insert-string("\371")\n\
!Mod4 Shift <Key>g : insert-string("\276")\n\
!Mod4 Shift <Key>h : insert-string("\271Z")\n\
!Mod4 Shift <Key>j : insert-string("\271ZAX")\n\
!Mod4 Shift <Key>k : insert-string("\210")\n\
!Mod4 Shift <Key>l : insert-string("\274")\n\
!Mod4 Shift <Key>z : insert-string("\365")\n\
!Mod4 Shift <Key>x : insert-string("\366")\n\
!Mod4 Shift <Key>c : insert-string("\200")\n\
!Mod4 Shift <Key>v : insert-string("\345")\n\
!Mod4 Shift <Key>b : insert-string("\342")\n\
!Mod4 Shift <Key>n : insert-string("\275")\n\
!Mod4 Shift <Key>m : insert-string("\370")\n
!
! Accelerator texts for the keystrokes that map onto menu items.
! N.b., this needs to correspond to the assignment of keystrokes to actions
! given at the head of the definition of Xpp.textTranslations above.
!
!
Xpp*command.semicolon.acceleratorText:			Ctrl-;
Xpp*edit.copy.acceleratorText:				Ctrl-C
Xpp*command.command-line.acceleratorText:		Ctrl-D
Xpp*edit.search-and-replace.acceleratorText:		Ctrl-F
Xpp*window.show-hide-script.acceleratorText:		Ctrl-H
Xpp*window.show-hide-journal.acceleratorText:		Ctrl-J
Xpp*command.interrupt.acceleratorText:			Ctrl-I
Xpp*edit.goto-line.acceleratorText:			Ctrl-L
Xpp*command.return.acceleratorText:			Ctrl-M
Xpp*command.execute-line.acceleratorText:		Ctrl-N
Xpp*file.open.acceleratorText:				Ctrl-O
Xpp*file.quit.acceleratorText:				Ctrl-Q
Xpp*file.save.acceleratorText:				Ctrl-S
Xpp*command.execute-selection.acceleratorText:		Ctrl-Space
Xpp*window.toggle-geometry.acceleratorText:		Ctrl-T
Xpp*edit.paste.acceleratorText:				Ctrl-V
Xpp*window.show-geometry.acceleratorText:		Ctrl-W
Xpp*edit.cut.acceleratorText:				Ctrl-X
Xpp*edit.redo.acceleratorText:				Ctrl-Y
Xpp*edit.undo.acceleratorText:				Ctrl-Z
