[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference clt::fuse

Title:DEC FUSE - UNIX SDE
Notice:See note #4 for kit locations
Moderator:TLE::TALCOTT
Created:Tue Oct 30 1990
Last Modified:Fri May 23 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1276
Total number of notes:4364

1259.0. "Key customizations unreliable, and how to interpret DFEditor" by PEACHS::DALEY (Maybe I should drink more coffee...or less!) Fri Jan 31 1997 14:25

Hi,

My customer sent in the mail below.  He has two things he wants to note, and  
a request, regarding the DFEditor file.

1) Shift+arrow doesn't work out of the box, and the fix he has is undocumented.
   This is one instance where the functionality described in DFEditor doesn't
   match th man page for XmText.

2) Some of his customizations are unreliable....they work, then all of a sudden
   they don't.  See below

3) Is there some detailed documentation on how to interpret DFEditor syntax?  For
   instance, what does the "~" in 

	~Shift <Key>Up:                previous-line()  \n\

   do?

   If he had such documentation, he could do more with customization.

   He has a PCXAL keyboard, FUSE 3.1-0 under UNIX 4.0A, and the keys work 
   consistently and correctly under CDE apps.

   Any help appreciated.

Regards,

John
------------------------------------------------------------------------------------

From daemon Fri Jan 24 16:17:04 1997
Received: from mail2.digital.com by decatl.alf.dec.com; (5.65v3.2/1.1.8.2/29May96-0321PM)
	id AA10964; Fri, 24 Jan 1997 16:16:55 -0500
Received: from ns2.eds.com by mail2.digital.com (5.65 EXP 4/12/95 for V3.2/1.0/WV)
	id AA00614; Fri, 24 Jan 1997 13:17:12 -0800
Received: from nnsp.eds.com (nnsp.eds.com [130.174.32.78])
          by ns2.eds.com (8.8.4/8.8.4) with ESMTP
	  id QAA30505 for <daley@alf.dec.com>; Fri, 24 Jan 1997 16:15:53 -0500 (EST)
Received: from mas1.atd.gmeds.com ([143.242.200.10]) by nnsp.eds.com (8.7.6/8.7.3) with SMTP id QAA08845 for <daley@alf.dec.com>; Fri, 24 Jan 1997 16:15:23 -0500 (EST)
Received: from etd1-53.atd.gmeds.com (etd1-53.atd.gmeds.com [143.242.208.53]) by mas1.atd.gmeds.com (8.6.12/8.6.6) with SMTP id QAA13834 for <daley@alf.dec.com>; Fri, 24 Jan 1997 16:17:47 -0500
Date: Fri, 24 Jan 1997 16:17:47 -0500
Message-Id: <2.2.16.19970124161339.5f5786ec@mas1.atd.gmeds.com>
X-Sender: tswbl@mas1.atd.gmeds.com
X-Mailer: Windows Eudora Pro Version 2.2 (16)
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: daley@alf.dec.com
From: Brandt Lawson <blawson@atd.gmeds.com>
Subject: Sequence # C970122-750
Content-Length: 6464

John,

Here is my 3rd message on FUSE editor keymapping problems. I have created a
DFEditor file to change the delete behavior and add a couple of features. It
is attached to the end of this message. It was created from the previous
DFEditor file that I sent you and it has its changes documented at the top
of the listing.

This is kinda my final problem - how to add features and have them work.
This file is intended to make my <--Backspace key delete-previous-character
and my Delete key delete-next-character. It does this pretty well but once
in a while the <--BackSpace key reverts to deleting forward after working in
an editor buffer. I cannot reliably reproduce this but when it happens, it
stays that way. 

The shift+arrow text selection still works fine.

Shift+delete does nothing.

The Tab and Enter keys do their new functions just fine.

As I used this configuration for a while, I noticed that the Control+Right and
Left arrow keys do not reliably jump forward and back word. Sometimes they
work and sometimes they don't. This and the erratic failure of <--BackSpace
are the behaviors which make me think that there is a bug.

I believe that I have a better handle on what is happening but I am still
missing something or something is broken. I have not yet finished reviewing
the material you sent to me but I will work on it.

Thanks

Brandt Lawson

=========================================================================
!-------------------------------------------------------------------------
! DFEditor
!-------------------------------------------------------------------------
! 24-jan-97	Brandt Lawson
!		Created from DFEditor provided by software support.
!		Changed <Key>Tab to insert 4 spaces.
!		Added <Key>Return to auto indent.
!		Worked on delete keys:
!			Deleted all <Key>osfDelete references.
!			Changed <Key>Delete to delete-next-character.
!			Changed Shift<Key>Delete to delete-next-word.
!			Added <Key>BackSpace to delete-previous-character.
!-------------------------------------------------------------------------
!
!   FUSE Editor application Resource File
!
!
! Translation table settings
! 1) Default key bindings for the FUSE Editor mostly based on
!    Motif supported event-action translations
! 2) Additional language sensitive macro templates, and mark functions
!
DFEditor*Hoe.translations:	#override \n\
	Ctrl<Key>F1:            insert-template("/* {\037comment\037} */") \n\
	Ctrl<Key>F2:            insert-template("/*\n  {\037comment\037}  \n*/") \n\
	Ctrl<Key>F3:	        c-if-clause() \n\
	Ctrl<Key>F4:	        c-if-else() \n\
	Ctrl<Key>F5:	        c-for-loop() \n\
	Ctrl<Key>F6:	        c-switch-clause() \n\
	Ctrl<Key>F7:	        c-while-loop() \n\
	Ctrl<Key>F8:	        c-do-while() \n\
	Ctrl<Key>F9:	        c-paren-left-right() \n\
        Ctrl<Key>(:             beginning-of-file()     \n\
        Ctrl<Key>):             end-of-file()     \n\
	Ctrl<Key>@:             set-mark()        \n\
	Ctrl<Key>^:             go-to-mark()        \n\
	Ctrl<Key>*:             swap-mark()        \n\
	Ctrl<Key>#:             select-to-mark()        \n\
	Ctrl<Key>~:             kill-to-mark()        \n\
        Ctrl<Key>[:             backward-paragraph()  \n\
        Ctrl<Key>]:             forward-paragraph()  \n\
        Ctrl<Key>Right:         forward-word()  \n\
        Ctrl<Key>Left:          backward-word()  \n\
        Ctrl<Key>a:             beginning-of-line()     \n\
	Ctrl<Key>e:             end-of-line()           \n\
	Ctrl<Key>b:             backward-character()    \n\
	Ctrl<Key>w:             backward-word()         \n\
	Ctrl<Key>f:             forward-character()     \n\
	Ctrl<Key>t:             forward-word()          \n\
	Ctrl<Key>n:             next-page()             \n\
	Ctrl<Key>p:             previous-page()         \n\
	Ctrl<Key>g:             scroll-one-line-up()    \n\
	Ctrl<Key>h:             scroll-one-line-down()  \n\
	Ctrl<Key>o:             newline-and-backup()    \n\
	Ctrl<Key>j:             newline-and-indent()    \n\
	Ctrl<Key>m:             newline()               \n\
	Ctrl<Key>d:             delete-previous-character()  \n\
	Ctrl<Key>q:             delete-next-character()      \n\
	Ctrl<Key>r:             delete-previous-word()  \n\
	Ctrl<Key>x:             delete-next-word()      \n\
	Ctrl<Key>k:             kill-to-end-of-line()   \n\
	Ctrl<Key>u:             kill-to-start-of-line() \n\
	Ctrl<Key>z:             kill-selection() \n\
	Ctrl<Key>y:             unkill() \n\
	Ctrl<Key>l:             redraw-display() \n\
        Shift<Key>Delete:       delete-next-word()  \n\
        <Key>Delete:            delete-next-character()  \n\
        <Key>BackSpace:         delete-previous-character()  \n\
        <Key>Tab:               insert-string("    ") \n\
        <Key>Return:            newline-and-indent() \n\
        ~Shift <Key>Up:                previous-line()  \n\
        ~Shift <Key>Down:              next-line()  \n\
        ~Shift <Key>Left:              backward-character()  \n\
        ~Shift <Key>Right:             forward-character() \n\
	<Key>osfInsert:		self-insert() \n\
	Ctrl<Key>backslash,~Ctrl<Key>i:	c-if-clause() \n\
	Ctrl<Key>backslash,~Ctrl<Key>e:	c-if-else() \n\
	Ctrl<Key>backslash,~Ctrl<Key>s:	c-switch-clause() \n\
	Ctrl<Key>backslash,~Ctrl<Key>f:	c-for-loop() \n\
	Ctrl<Key>backslash,~Ctrl<Key>w:	c-while-loop() \n\
	Ctrl<Key>backslash,~Ctrl<Key>d:	c-do-while() \n\
	Ctrl<Key>backslash,~Ctrl<Key>{:	c-paren-left-right() \n\
	Ctrl<Key>backslash,~Ctrl<Key>/:	insert-template("/* {\037comment\037} */") \n\
	Ctrl<Key>backslash,~Ctrl<Key>*:	insert-template("/*\n  {\037comment\037}
\n*/") \n\
	Ctrl<Key>backslash,~Ctrl<Key>f:	c-for-loop() \n\
	~Ctrl<Key>i:		self-insert() \n\
	~Ctrl<Key>e:		self-insert() \n\
	~Ctrl<Key>s:		self-insert() \n\
	~Ctrl<Key>f:		self-insert() \n\
	~Ctrl<Key>w:		self-insert() \n\
	~Ctrl<Key>d:		self-insert() \n\
	~Ctrl<Key>{:		self-insert() \n\
	~Ctrl<Key>/:		self-insert() \n\
	~Ctrl<Key>*:		self-insert() 

!
! Min Defaults for the form widget
!
DFEditor.minHeight : 300
DFEditor.minWidth : 425
              

! default values for application specific resources
DFEditor*hoeAutoRaise			:true
DFEditor*hoeOutdatedBufferBehavior	:prompt

! end of resources

!
!    The following were added by FUSE Options customizing
!

DFEditor*showLines:	false

===========================================================================



T.RTitleUserPersonal
Name
DateLines
1259.1~ in Translation tablesTLE::CHAYAMon Feb 03 1997 15:1126
Translations for keyboard events specify a set of keys that must be in a
particular state for the translation to trigger.  The X protocol defines a set
of eight modifier bits that can be assoicated with the keys.  Modifier not
mentioned can be in any state, so in

<Key>Up:	previous-line(),

the previous-line action routine is called irrespective of the fact that the
modifiers (eg., Shift, Ctrl) may be set.

The '~' character is used to specify that certain modifiers not be set.  For
ex., in 

~Shift <Key>Up:	previous-line()

the previous-line action routine is called if the 'Up' key is pressed and
'Shift' key is not pressed.  If the 'Up' key and the 'Shift' key are both
pressed, the default binding for this key combination is called.  This ensures
that shift+arrow text selection works.

I tried using the customer's DFEditor file and the translations he mentioned as
being erratic seemed to work fine during the short period I tried them.  I have
no idea why he is seeing erratic behavior - I'll look into this some more.

--Chaya.

1259.2Adding to the previous reply ...TLE::CHAYAMon Feb 03 1997 15:2715
>~Shift <Key>Up:	previous-line()
>Here, the previous-line action routine is called if the 'Up' key is pressed and
>'Shift' key is not pressed.

To get the Shift+arrow text selection to work right, you could also just specify
that <Key>Up should use previous-line only if none of the modifier keys are set.
 To do this, say

None <Key>Up:	previous-line()

You could ask the customer to try this.  Although it doesn't seem very likely,
it could be the reason that Ctrl+Right and Ctrl+Left are erratic at times.

--Chaya.