[SunHELP] Using F1 in dtterm

Magnus Abrante sunhelp at sunhelp.org
Thu Sep 20 02:40:04 CDT 2001


David,

Please see FAQ 2385 included below..

best regards,

        //Magnus Abrante
/* This is my opinion and not the one of my employer */

> I've got a curses user application that I'd like access to in dtterm, 
> but I need the F1 key to go to the application where now every time I 
> press the F1 I get the help menu (which doesn't tell how to get rid of 
> it -- nor is there anything comprehensible in the man page).
> 
> Can someone direct this poor feller to a clue?


Document ID: 2385

SYNOPSIS:  Unable to mask F1 key from bringing help window in dtterm

DETAIL DESCRIPTION:

I want the F1 key to be passed on to my application running in a dterm,
but the window manager catches the F1 and always brings up the help
window.  I would like to disable it, how? 


SOLUTION SUMMARY:

There are two ways that you can do this. 

First using the Options->Terminal menu in dtterm setting the Keypad Mode
to application would pass the F1 key to the application. 

If you need this to be automated you can change the key translations. 
Here is an example of how the key translation can be changed. 

Copy the following into a file and set the environmental variable
XENVIRONMENT to point to this file that you have created.  In the file
the F1 key translates to a ^[[11~ . 

---- Begin XENVIRONMENT file  -----

Dtterm*dtTermView*DtTerm*translations: #replace \
<Key>F1:	string(0x1b) string("[11~")\n\
Shift<Key>osfInsert:         string("shift osfInsert")\n\
Shift<Key>Insert:         string("shift Insert")\n\
<Key>SunF37:		string("F12 Pressed")\n\
<Key>SunF36:		hard-reset()\n\
Shift ~Ctrl<Key>KP_Multiply:	XtDisplayInstalledAccelerators()\n\
~Shift Ctrl<Key>KP_Multiply:	XtDisplayAccelerators()\n\
Shift Ctrl<Key>KP_Multiply:	XtDisplayTranslations()\n\
<Key>osfCancel:         process-cancel()\n\
<Key>osfCopy:		copy-clipboard()\n\
<Key>osfCut:		copy-clipboard()\n\
<Key>osfPaste:		paste-clipboard()\n\
<Key>osfBeginLine:      beginning-of-buffer()\n\
<Key>Home:              beginning-of-buffer()\n\
<Key>osfEndLine:        end-of-buffer()\n\
<Key>End:               end-of-buffer()\n\
Shift<Key>osfUp:	scroll(1,line)\n\
Shift<Key>Up:	        scroll(1,line)\n\
Shift<Key>osfDown:	scroll(-1,line)\n\
Shift<Key>Down:	        scroll(-1,line)\n\
<Key>osfUp:		move-cursor(up)\n\
<Key>Up:		move-cursor(up)\n\
<Key>osfDown:		move-cursor(down)\n\
<Key>Down:		move-cursor(down)\n\
<Key>osfLeft:		move-cursor(backward)\n\
<Key>Left:		move-cursor(backward)\n\
<Key>osfRight:		move-cursor(forward)\n\
<Key>Right:		move-cursor(forward)\n\
<Key>Find:	        vt-edit-key(find)\n\
~Shift<Key>osfPageUp:	vt-edit-key(prior)\n\
~Shift<Key>Prior:	vt-edit-key(prior)\n\
~Shift<Key>osfPageDown:	vt-edit-key(next)\n\
~Shift<Key>Next:	vt-edit-key(next)\n\
<Key>osfPageUp:		scroll(-1,page)\n\
<Key>Prior:	        scroll(-1,page)\n\
<Key>osfPageDown:	scroll(1,page)\n\
<Key>Next:	        scroll(1,page)\n\
Mod1<Key>Break:		soft-reset()\n\
Shift<Key>Break:	hard-reset()\n\
~Shift ~Mod1<Key>Break:	vt-break(long)\n\
Ctrl<Key>Cancel:	stop(long)\n\
~Ctrl<Key>Cancel:	stop()\n\
~Shift<Key>Tab:		tab()\n\
<Key>osfActivate:	keypad-key-execute(enter)\n\
<Key>KP_Space:		keypad-key-execute(space)\n\
<Key>KP_Tab:		keypad-key-execute(tab)\n\
<Key>KP_Enter:		keypad-key-execute(enter)\n\
<Key>KP_F1:		keypad-key-execute(f1)\n\
<Key>KP_F2:		keypad-key-execute(f2)\n\
<Key>KP_F3:		keypad-key-execute(f3)\n\
<Key>KP_F4:		keypad-key-execute(f4)\n\
<Key>KP_Equal:		keypad-key-execute(equal)\n\
<Key>KP_Multiply:	keypad-key-execute(multiply)\n\
<Key>KP_Add:		keypad-key-execute(add)\n\
<Key>KP_Separator:	keypad-key-execute(separator)\n\
<Key>KP_Subtract:	keypad-key-execute(subtract)\n\
<Key>KP_Decimal:	keypad-key-execute(decimal)\n\
<Key>KP_Divide:		keypad-key-execute(divide)\n\
!Mod1<Key>KP_0:		insert()\n\
!Mod1<Key>KP_1:		insert()\n\
!Mod1<Key>KP_2:		insert()\n\
!Mod1<Key>KP_3:		insert()\n\
!Mod1<Key>KP_4:		insert()\n\
!Mod1<Key>KP_5:		insert()\n\
!Mod1<Key>KP_6:		insert()\n\
!Mod1<Key>KP_7:		insert()\n\
!Mod1<Key>KP_8:		insert()\n\
!Mod1<Key>KP_9:		insert()\n\
<Key>KP_0:		keypad-key-execute(0)\n\
<Key>KP_1:		keypad-key-execute(1)\n\
<Key>KP_2:		keypad-key-execute(2)\n\
<Key>KP_3:		keypad-key-execute(3)\n\
<Key>KP_4:		keypad-key-execute(4)\n\
<Key>KP_5:		keypad-key-execute(5)\n\
<Key>KP_6:		keypad-key-execute(6)\n\
<Key>KP_7:		keypad-key-execute(7)\n\
<Key>KP_8:		keypad-key-execute(8)\n\
<Key>KP_9:		keypad-key-execute(9)\n\
Shift<Key>F1:		vt-function-key-execute(1, UDK)\n\
Shift<Key>F2:		vt-function-key-execute(2, UDK)\n\
Shift<Key>F3:		vt-function-key-execute(3, UDK)\n\
Shift<Key>F4:		vt-function-key-execute(4, UDK)\n\
Shift<Key>F5:		vt-function-key-execute(5, UDK)\n\
Shift<Key>F6:		vt-function-key-execute(6, UDK)\n\
Shift<Key>F7:		vt-function-key-execute(7, UDK)\n\
Shift<Key>F8:		vt-function-key-execute(8, UDK)\n\
Shift<Key>F9:		vt-function-key-execute(9, UDK)\n\
Shift<Key>F10:		vt-function-key-execute(10, UDK)\n\
Shift<Key>F11:		vt-function-key-execute(11, UDK)\n\
Shift<Key>F12:		vt-function-key-execute(12, UDK)\n\
Shift<Key>F13:		vt-function-key-execute(13, UDK)\n\
Shift<Key>F14:		vt-function-key-execute(14, UDK)\n\
Shift<Key>F15:		vt-function-key-execute(15, UDK)\n\
Shift<Key>F16:		vt-function-key-execute(16, UDK)\n\
Shift<Key>F17:		vt-function-key-execute(17, UDK)\n\
Shift<Key>F18:		vt-function-key-execute(18, UDK)\n\
Shift<Key>F19:		vt-function-key-execute(19, UDK)\n\
Shift<Key>F20:		vt-function-key-execute(20, UDK)\n\
Shift<Key>F21:		vt-function-key-execute(21, UDK)\n\
Shift<Key>F22:		vt-function-key-execute(22, UDK)\n\
Shift<Key>F23:		vt-function-key-execute(23, UDK)\n\
Shift<Key>F24:		vt-function-key-execute(24, UDK)\n\
Shift<Key>F25:		vt-function-key-execute(25, UDK)\n\
Shift<Key>F26:		vt-function-key-execute(26, UDK)\n\
Shift<Key>F27:		vt-function-key-execute(27, UDK)\n\
Shift<Key>F28:		vt-function-key-execute(28, UDK)\n\
Shift<Key>F29:		vt-function-key-execute(29, UDK)\n\
Shift<Key>F30:		vt-function-key-execute(30, UDK)\n\
Shift<Key>F31:		vt-function-key-execute(31, UDK)\n\
Shift<Key>F32:		vt-function-key-execute(32, UDK)\n\
Shift<Key>F33:		vt-function-key-execute(33, UDK)\n\
Shift<Key>F34:		vt-function-key-execute(34, UDK)\n\
Shift<Key>F35:		vt-function-key-execute(35, UDK)\n\
~Shift<Key>F1:		vt-function-key-execute(1, function)\n\
~Shift<Key>F2:		vt-function-key-execute(2, function)\n\
~Shift<Key>F3:		vt-function-key-execute(3, function)\n\
~Shift<Key>F4:		vt-function-key-execute(4, function)\n\
~Shift<Key>F5:		vt-function-key-execute(5, function)\n\
~Shift<Key>F6:		vt-function-key-execute(6, function)\n\
~Shift<Key>F7:		vt-function-key-execute(7, function)\n\
~Shift<Key>F8:		vt-function-key-execute(8, function)\n\
~Shift<Key>F9:		vt-function-key-execute(9, function)\n\
~Shift<Key>F10:		vt-function-key-execute(10, function)\n\
~Shift<Key>F11:		vt-function-key-execute(11, function)\n\
~Shift<Key>F12:		vt-function-key-execute(12, function)\n\
~Shift<Key>F13:		vt-function-key-execute(13, function)\n\
~Shift<Key>F14:		vt-function-key-execute(14, function)\n\
~Shift<Key>F15:		vt-function-key-execute(15, function)\n\
~Shift<Key>F16:		vt-function-key-execute(16, function)\n\
~Shift<Key>F17:		vt-function-key-execute(17, function)\n\
~Shift<Key>F18:		vt-function-key-execute(18, function)\n\
~Shift<Key>F19:		vt-function-key-execute(19, function)\n\
~Shift<Key>F20:		vt-function-key-execute(20, function)\n\
~Shift<Key>F21:		vt-function-key-execute(21, function)\n\
~Shift<Key>F22:		vt-function-key-execute(22, function)\n\
~Shift<Key>F23:		vt-function-key-execute(23, function)\n\
~Shift<Key>F24:		vt-function-key-execute(24, function)\n\
~Shift<Key>F25:		vt-function-key-execute(25, function)\n\
~Shift<Key>F26:		vt-function-key-execute(26, function)\n\
~Shift<Key>F27:		vt-function-key-execute(27, function)\n\
~Shift<Key>F28:		vt-function-key-execute(28, function)\n\
~Shift<Key>F29:		vt-function-key-execute(29, function)\n\
~Shift<Key>F30:		vt-function-key-execute(30, function)\n\
~Shift<Key>F31:		vt-function-key-execute(31, function)\n\
~Shift<Key>F32:		vt-function-key-execute(32, function)\n\
~Shift<Key>F33:		vt-function-key-execute(33, function)\n\
~Shift<Key>F34:		vt-function-key-execute(34, function)\n\
~Shift<Key>F35:		vt-function-key-execute(35, function)\n\
<KeyRelease>:		key-release()\n\
<KeyPress>:		insert()\n\
~Shift~Ctrl<Btn1Down>:	grab-focus()\n\
Shift~Ctrl<Btn1Down>:   extend-start()\n\
~Ctrl<Btn1Motion>:      select-adjust()\n\
~Ctrl<Btn1Up>:		extend-end()\n\
~Shift<Btn2Down>:	process-bdrag()\n\
~Shift<Btn2Up>:		copy-to()\n\
<EnterWindow>:		enter()\n\
<LeaveWindow>:		leave()\n\
<FocusIn>:		focus-in()\n\
<FocusOut>:		focus-out()\n\

---- End XENVIRONMENT file -----


DATE APPROVED: 05/06/98
KEYWORDS:      mask dtterm            

OS RELEASE:    2.6



More information about the SunHELP mailing list