[comp.editors] L#, F# and R# unleashed!

) (08/14/90)

Yo!

Have you ever wanted to get JOVE to recognize all those function keys
on your sun but you just didn't want to figure it out?  Well, want no
longer.  Just throw the code below into your .joverc file, run JOVE,
and be amazed.  :-)

To get it working in X, you will have to throw the -sf switch on in
xterm and select _application cursor keys_ on the menu (Ctrl-Button2)
to get the cursor keys working.  (This is really whack and I would
love it if somebody out there knows a solution to this.  I hope it's a
RTFM thing.)

I also imagine that preset key bindings in the window manager would
screw things up.  I believe that this is what happens in Sunview,
where the L# & F# keys won't all work.  I don't know how to work
around it and such an exercise is left to the reader.

Feel free to make modifications.

~CUT~HERE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# sun keypad stuff for sun 3/60
#
# This is a modification to the efforts of this one dude on the
# net to get JOVE to recognize the function keys on his sun 3/80.
# The modified code allows a sun 3/60 (or actually the keyboards
# that come with the sun's we have) to do the same.
# What follows briefly are his original notes and the .joverc code.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# sun keypad stuff for sun 3/80
# Note: You need a new keymap for each character in a
# function-key key sequence.  As you can see, you need to create
# different maps for all the different keys.  JOVE needs a
# function to take a string and build maps internally to
# accomodate those strings.  Alas, such a function does not
# exist, although I have been giving it some serious thought,
# as I live!  Also, jove keymaps are always full keymaps, so even
# though most of the keymaps are used to store just ONE object,
# 128 slots are allocated for each map.  JOVE has no concept of
# sparse keymaps.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# For the following .joverc stuff I've made the following
# key<->command assignments.
#
# 	R1	=	over-write
#	R2	= 	beginning-of-file
#	R3	=	previous-page
#	R4	=	delete-next-character
#	R5	=	end-of-file
#	R6	=	next-page
#	R7	=	beginning-of-line
#	R9	=	end-of-line
#	R11	=	beginning-of-line
#	R13	=	backward-word
#	R15	=	forward-word
#   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#	F1	=	save-file
#	F2	=	auto-fill-mode
#	F3	=	exit-jove
#	F4	=	find-file
#	F5	=	select-buffer
#	F6	=	make-macro-interactive
#	F7	=	execute-kbd-macro
#	F8	=	c-mode
#	F9	= 	text-mode
#   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
#	L1	=	next-window
#	L2	=	kill-next-word
#	L3	=	shrink-window
#	L4	=	grow-window
#	L5	=	scroll-down
#	L6	=	scroll-up
# 	L7	=	backward-paragraph
#	L8	=	forward-paragraph
#	L9	=	backward-sentence
#	L10	=	forward-sentence
make-keymap sun1-map
bind-keymap-to-key sun1-map ^[[1
make-keymap sun19-map
bind-keymap-to-key sun19-map ^[[19
make-keymap sun2-map
bind-keymap-to-key sun2-map ^[[2
make-keymap sun20-map
bind-keymap-to-key sun20-map ^[[20
make-keymap sun21-map
bind-keymap-to-key sun21 ^[[21
make-keymap sun22-map
bind-keymap-to-key sun22-map ^[[22
make-keymap sun23-map
bind-keymap-to-key sun2-map ^[[23
#
# over-write (R1)
make-keymap sun208-map
bind-keymap-to-key sun208-map ^[[208
bind-to-key over-write ^[[208z
#
# beginning of file (R2)
make-keymap sun209-map
bind-keymap-to-key sun209-map ^[[209
bind-to-key beginning-of-file ^[[209z
#
# previous page (R3)
make-keymap sun210-map
bind-keymap-to-key sun210-map ^[[210
bind-to-key previous-page ^[[210z
#
# delete next character (R4)
make-keymap sun211-map
bind-keymap-to-key sun211-map ^[[211
bind-to-key delete-next-character ^[[211z
#
# end of file (R5)
make-keymap sun212-map
bind-keymap-to-key sun212-map ^[[212
bind-to-key end-of-file ^[[212z
#
# next page (R6)
make-keymap sun213-map
bind-keymap-to-key sun213-map ^[[213
bind-to-key next-page ^[[213z
#
# beginning of line (R7)
make-keymap sun214-map
bind-keymap-to-key sun214-map ^[[214
bind-to-key beginning-of-line ^[[214z
#
# end of line (R9)
make-keymap sun216-map
bind-keymap-to-key sun216-map ^[[216
bind-to-key end-of-line ^[[216z
#
# beginning of line (R11)
make-keymap sun218-map
bind-keymap-to-key sun218-map ^[[218
bind-to-key beginning-of-line ^[[218z
#
# backward word (R13)
make-keymap sun220-map
bind-keymap-to-key sun220-map ^[[220
bind-to-key backward-word ^[[220z
#
# forward word (R15)
make-keymap sun222-map
bind-keymap-to-key sun222-map ^[[222
bind-to-key forward-word ^[[222z
#
# save file (F1)
make-keymap sun224-map
bind-keymap-to-key sun224-map ^[[224
bind-to-key save-file ^[[224z
#
# auto fill mode (F2)
make-keymap sun225-map
bind-keymap-to-key sun225-map ^[[225
bind-to-key auto-fill-mode ^[[225z
#
# exit jove (F3)
make-keymap sun226-map
bind-keymap-to-key sun226-map ^[[226
bind-to-key exit-jove ^[[226z
#
# find file (F4)
make-keymap sun227-map
bind-keymap-to-key sun227-map ^[[227
bind-to-key find-file ^[[227z
#
# select-buffer (F5)
make-keymap sun228-map
bind-keymap-to-key sun228-map ^[[228
bind-to-key select-buffer ^[[228z
#
# make macro interactive (F6)
make-keymap sun229-map
bind-keymap-to-key sun229-map ^[[229
bind-to-key make-macro-interactive ^[[229z
#
# execute kbd macro (F7)
make-keymap sun230-map
bind-keymap-to-key sun230-map ^[[230
bind-to-key execute-kbd-macro ^[[230z
#
# c mode (F8)
make-keymap sun231-map
bind-keymap-to-key sun231-map ^[[231
bind-to-key c-mode ^[[231z
#
# text mode (F9)
make-keymap sun232-map
bind-keymap-to-key sun232-map ^[[232
bind-to-key text-mode ^[[232z
#
# next window (L1)
make-keymap sun192-map
bind-keymap-to-key sun192-map ^[[192
bind-to-key next-window ^[[192z
#
# kill next word (L2)
make-keymap sun193-map
bind-keymap-to-key sun193-map ^[[193
bind-to-key kill-next-word ^[[193z
#
# shrink window (L3)
make-keymap sun194-map
bind-keymap-to-key sun194-map ^[[194
bind-to-key shrink-window ^[[194z
#
# grow window (L4)
make-keymap sun195-map
bind-keymap-to-key sun195-map ^[[195
bind-to-key grow-window ^[[195z
#
# scroll-down (L5)
make-keymap sun196-map
bind-keymap-to-key sun196-map ^[[196
bind-to-key scroll-down ^[[196z
#
# scroll-up (L6)
make-keymap sun197-map
bind-keymap-to-key sun197-map ^[[197
bind-to-key scroll-up ^[[197z
#
# backward paragraph (L7)
make-keymap sun198-map
bind-keymap-to-key sun198-map ^[[198
bind-to-key backward-paragraph ^[[198z
#
# forward paragraph (L8)
make-keymap sun199-map
bind-keymap-to-key sun199-map ^[[199
bind-to-key forward-paragraph ^[[199z
#
# backward sentence (L9)
make-keymap sun200-map
bind-keymap-to-key sun200-map ^[[200
bind-to-key backward-sentence ^[[200z
#
# forward sentence (L10)
make-keymap sun201-map
bind-keymap-to-key sun201-map ^[[201
bind-to-key forward-sentence ^[[201z
#
~CUT~HERE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


hasta winnebago

-charles

cyj9h@Virginia.EDU