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

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1598.0. "Stext/DwtTest translations for cursor movement" by 1SHOT::HOULE (Steve, NM is the future!) Wed Oct 18 1989 18:11

Since the X resources are not documented (for VMS) and I don't have the Ultrix
or X MIT docs  I've read this conference till my eyes are going bad!

Here's what I need. I want to be able to define control keys to move the cursor
 in MOST of my windows (All is too much to ask) in all four directions.


I found *DWText & SText But don't know what the words are for:
	move-up, move-down, move-left, move-right       (am i close?)
I already got ctrl j to delete after instead of before (lucky me)

Once I have these will putting them in decw$sm_general.dat make them available
for all the application (e.g. mail -PLEASE) or do i need to define the DWtext &
SText in each app's .dat file? From what I've tried I think the later may be 
true. 

Finally, if this info is somewhere believe me I Looked and I looked!

T.RTitleUserPersonal
Name
DateLines
1598.1SMURF::COUTUHe who will not risk, cannot win.Thu Oct 19 1989 00:3172
    Below is the pertinent portion of the sample .Xdefaults file provided on
    ULTRIX systems. While it may not be real verbose I don't want to
    clutter up this file either. Look at the function calls that map onto
    the keybindings for a clue as to what the binding does. While they may
    not all be obvious I think that you'll find the ones for cursor motion
    fairly easily. I'm not sure which VMS file you'd put this into though.
    In particular look for the bindings for ^F, ^B, ^N, and ^P.
    
    Have fun,
    
    Dan
    
!
! DECtoolkit text bindings
!
*DwtText.translations:       Shift<Key>0xff53:	forward-word()\n\
	<Key>0xff53:		forward-character()\n\
	Shift<Key>0xff51:	backward-word()\n\
	<Key>0xff51:		backward-character()\n\
	<Key>0xff54:		next-line()\n\
	<Key>0xff52:		previous-line()\n\
	Shift<Key>0xffff:	delete-next-character()\n\
	<Key>0xffff:		delete-previous-character()\n\
	Shift<Key>0xffc9:	end-of-line()\n\
	<Key>0xffc9:		beginning-of-line()\n\
	Shift<Key>0xff08:	end-of-line()\n\
	<Key>0xff08:		beginning-of-line()\n\
	Shift<Key>0xffca:	delete-next-word()\n\
	<Key>0xffca:		delete-previous-word()\n\
	<Key>0xff0d:		newline()\n\
	Shift<Key>0xff0a:	delete-next-word()\n\
	<Key>0xff0a:		delete-previous-word()\n\
	Shift ~Ctrl ~Alt<Btn1Down>:			extend-start()\n\
	Shift ~Ctrl ~Alt Button1<PtrMoved>:		extend-adjust()\n\
	Shift ~Ctrl ~Alt<Btn1Up>:			extend-end()\n\
	Ctrl ~Shift ~Alt<Btn1Down>: grab-focus() 	set-insertion-point()\n\
	Ctrl ~Shift ~Alt Button1<PtrMoved>:		\n\
	Ctrl ~Shift ~Alt<Btn1Up>:			\n\
	~Shift ~Ctrl ~Alt<Btn1Down>: grab-focus() 	set-insertion-point() select-start()\n\
	~Shift ~Ctrl ~Alt Button1<PtrMoved>:		extend-adjust()\n\
	~Shift ~Ctrl ~Alt<Btn1Up>:			extend-end()\n\
	~Shift ~Ctrl ~Alt<Btn3Down>:			stuff()\n\
     Ctrl<Key>f:	forward-character()\n\
     Ctrl<Key>b:	backward-character()\n\
     Alt<Key>f:	forward-word()\n\
     Alt<Key>b:	backward-word()\n\
     Alt<Key>]:	forward-paragraph()\n\
     Ctrl<Key>[:	backward-paragraph()\n\
     Ctrl<Key>a:	beginning-of-line()\n\
     Ctrl<Key>e:	end-of-line()\n\
     Ctrl<Key>n:	next-line()\n\
     Ctrl<Key>p:	previous-line()\n\
     Ctrl<Key>v:	next-page()\n\
     Alt<Key>v:	previous-page()\n\
     Alt<Key>\\<:	beginning-of-file()\n\
     Alt<Key>\\>:	end-of-file()\n\
     Ctrl<Key>z:	scroll-one-line-up()\n\
     Alt<Key>z:	scroll-one-line-down()\n\
     Ctrl<Key>d:	delete-next-character()\n\
     Ctrl<Key>h:	delete-previous-character()\n\
     ~Shift Alt<Key>d:	delete-next-word()\n\
     ~Shift Alt<Key>h:	delete-previous-word()\n\
     Ctrl<Key>w:	kill-selection()\n\
     Ctrl<Key>y:	unkill()\n\
     Alt<Key>y:	stuff()\n\
     Ctrl<Key>j:	newline-and-indent()\n\
     Ctrl<Key>o:	newline-and-backup()\n\
     Ctrl<Key>m:	newline()\n\
     Ctrl<Key>l:	redraw-display()\n\
     Ctrl<Key>k:	kill-to-end-of-line()\n\
     Any<Key>:	self-insert()

1598.2Ultrix Translations doc & X11R3 problems...MLNEDU::FERRARAGiancarlo - Customer Trng ITALYFri Oct 20 1989 10:3642
Many times, to have a complete solution to a DECwindows problem, you need
to merge VMS/Ultrix documentation. In a common, open programming enviroment
it's a bit strange that some features are documented in a doc set and not
in an other.
Anyway, in the following reply i have inserted the output of the command
man X on an ultrix (just tthe section dealing with resorces).

1. The modifier c (instead of Ctrl),s (Shift) ando so on are UNRECOGNIZED
   on VMS systems.
2. Other undocumented modifier (documented of X11R3 - Toolkit documentation)
   such ! or : work very well!

3. AND this is my question:
   X11R3 standard documentation, in the section dealing with Menu Popop
   Shell says:
   "To pop up a menu when a pointer button is pressed or when the pointer
    is moved into some window, use MenuPopup. From a translation writer's
    point of view, the definition for this translation action is:

	void MenuPopup(shell_name)
		String shell_name;
	shell_name Specifies the name of the widget shell to pop up

    MenuPopup is known to the translation manager...."

    If you see toolkit reference manual, XtAddActions() you can
    find that ALSO VMS DECwindows translations manager knows MenuPopup.

    And if you add an other translations
	"<Btn2Down> : MenuPopup(foo)"
    no warning came from toolkit (if you use Pippo() instead of MenuPopup()
    a warning "no action Pippo found" appears)
    
    BUT pressing button 2, application stops with error "can't find
    foo" ALSO if a Pop up menu foo is in the istance hierarchy.

    Someone can help me? (also if is easy to write a Popup action,
    why not use a standard toolkit feature?)

    Many thanks!
    

1598.3Output of "man X" on an ultrix system (defaults only)MLNEDU::FERRARAGiancarlo - Customer Trng ITALYFri Oct 20 1989 10:38660
    
                                                            X(1X)



X DEFAULTS
     Most X-based applications read the .Xdefaults file during
     startup and use the appropriate resource specifications to
     customize the appearance or characteristics of their win-
     dows.  The format for a resource specification in the .Xde-
     faults file is:

     [_n_a_m_e*]_r_e_s_o_u_r_c_e:  _v_a_l_u_e

     _n_a_m_e      Specifies the application name or the name string
               that restricts the resource assignment to that
               application or to a component of an application.
               If this argument is not specified, the resource
               assignment is globally available to all X applica-
               tions.

     _r_e_s_o_u_r_c_e  Specifies the X resource.

     _v_a_l_u_e     Specifies the value that is to be assigned to the
               resource.

     Because each toolkit-based application can consist of a com-
     bination of widgets (for example, push buttons and a scroll
     bar), you can form the name string, in addition to the
     application name, by adding widget class and name identif-
     iers to the string.

     In most cases, an asterisk (*) should be used as a delim-
     iter.  An asterisk is similar to a wildcard character
     because it specifies that the definition applies even if any
     additional names and classes are omitted.  A period delim-
     iter (.) indicates an absolute widget pathname.  When using
     a period, if you do not specify all widgets in the path, the
     specification will not work.

     When you add a widget class identifier to the name string,
     you make the resource available to every occurrence of that
     widget in the application.  For example, the following
     assigns the background color of every push button in the
     _d_x_m_a_i_l window to green:

          dxmail*PushButton*background:     green


     When you add a widget name identifier to the name string,
     you make the resource available to the specific widget (com-
     ponent) with that name in the application.  For example, the
     following assigns the background color of the Exit push but-
     ton in the _d_x_m_a_i_l window to green:






                                                                5






X(1X)



          dxmail*Exit*background:     green


     This example adds a name identifier (Exit) to the string.

     The application name does not have to be part of the string.
     For example, the next two specifications assign the back-
     ground color of button boxes.  The first assigns all button
     boxes with the same class identifier in all toolkit-based
     applications to blue.  The second assigns all button boxes
     with the name tocButtons in all toolkit-based applications
     to red:

          *ButtonBox*background:                   blue
          *ButtonBox*tocButtons*background:        red


     For a complete description of the general widget classes,
     the core attributes for each widget, and the widget-specific
     attributes see the _I_n_t_r_o _t_o _t_h_e _U_W_S _E_n_v_i_r_o_n_m_e_n_t

                                 _N_O_T_E

          Default values may be modified by specific appli-
          cations.


     For information about the resources that can be specified
     for each X client application, see the reference page for
     that application.

     The following is a sample .Xdefaults file that can be used
     as a template.

     ################################################################
     #
     #       general defaults
     #
     ################################################################

     *Font:                  helvetica_bold12
     *Text*Font:             helvetica12
     *Pushbutton.Font:       helvetica_bold12
     *titlebar.Font:         helvetica_bold12

     *ButtonBox.borderWidth: 1
     *ButtonBox.hSpace:      8

     *ButtonBox.Command.borderWidth: 0
     *ButtonBox.Command.internalWidth:       1
     *ButtonBox.Command.internalHeight:      1




6






                                                            X(1X)



     #
     # dxmail
     #

     dxmail*debug: on
     dxmail*tocGeometry:   510x284+0+19
     dxmail*viewGeometry:  510x460+0+323
     dxmail*folders.Pushbutton.MarginWidth: 2
     dxmail*folders.Pushbutton.MarginHeight: 2
     dxmail*PrintCommand:  enscript >2 /dev/null > /dev/null

     dxmail*ButtonBox*Font:        helvetica_bold12

     Dxterm*fontSetName: 6x13
     Dxterm*saveLinesOffTop: on
     Dxterm*screenMode: true
     Dxterm*autoWrapEnable: on
     Dxterm*autoRepeatEnable: on
     Dxterm*autoResize: on
     Dxterm*scrollVertical: on

     #
     # Session Manager
     #

     sm.create_terminal:     1
     sm.startup_state:       iconified

     #
     # wm
     #

     wm*sticky:      true
     wm*border:      #00ffff


KEY BINDINGS
     The DECwindows user interface provides basic text editing
     operations.  In these text editing operations, a word is
     considered to be any contiguous string of characters that
     does not contain a word break character. Word break charac-
     ters are as follows: space, tab, and line terminators.  In
     addition, any contiguous string of identical word break
     characters (such as three spaces) is considered to be a
     word.  The built-in text editing operations for all text
     windows are as follows:

     Right arrow              Moves the cursor one character to
                              the right. In a single-line field,
                              the cursor does not move when posi-
                              tioned at the end of the line.  In
                              a multi-line field, the cursor



                                                                7






X(1X)



                              moves to the first position of the
                              next line.

     Left arrow               Moves the cursor one character to
                              the left. In a single-line field,
                              the cursor does not move when posi-
                              tioned at the beginning of the
                              line.  In a multi-line field, the
                              cursor moves to the last position
                              of the previous line.

     Up arrow                 In a multi-line field, moves the
                              cursor up one line.

     Down arrow               In a multi-line field, moves the
                              cursor down one line.

     F11, F14                 Reserved.

     F12                      Positions the cursor at the begin-
                              ning of the line.

     SHIFT/F12                Positions the cursor at the end of
                              the line.

     F13                      Deletes the characters to the left
                              of the cursor up to and including
                              the beginning of the word, and
                              shifts to the left all text to the
                              right of the deleted character.

     SHIFT/F13                Deletes the characters to the right
                              of the cursor up to and including
                              the beginning of the word, and
                              shifts to the right all text to the
                              right of the deleted character.

     DELETE                   Deletes the character before the
                              cursor, and moves all text to the
                              right of the deleted character one
                              space to the left. DELETE works the
                              same way in both insert and over-
                              strike mode.  When there is a
                              selection, DELETE removes the
                              selection but does not place it in
                              the clipboard.

     SHIFT/DELETE             Deletes the character after the
                              cursor, and moves all text to the
                              right of the deleted character one
                              space to the left.  In overstrike
                              mode, SHIFT/DELETE deletes the



8






                                                            X(1X)



                              character under the block cursor.

     A dialog box has one text insertion cursor, even if it has
     multiple text windows.  Keys in a dialog box with multiple
     text windows take on the following additional actions:

     TAB                      Moves the cursor from the current
                              field to the next field.  If any
                              text exists in the new field, it is
                              automatically selected for pending
                              delete.

     SHIFT/TAB                Moves the cursor from the current
                              field to the previous field.  If
                              any text exists in the new field,
                              it is automatically selected for
                              pending delete.

     RETURN                   Activates the default push button
                              (if there is one) in the dialog
                              box.

     ENTER                    Activates the default push button
                              (if there is one) in the dialog
                              box.

     SHIFT/RETURN             Activates the Cancel push button
                              (if there is one) in the dialog
                              box.

     You can customize the basic text editing functions for text
     windows with the translations resource specified in the
     .Xdefaults file.  This resource should be specified as:

     *Text.translations:     _k_e_y _s_p_e_c_i_f_i_c_a_t_i_o_n

     Each key specification listed with the translations resource
     assigns an editor command to a named key or mouse combina-
     tion and has the format:

     _k_e_y:    _f_u_n_c_t_i_o_n

     _k_e_y                 Specifies the key or mouse button that
                         is used to invoke the named function.











                                                                9






X(1X)



     _f_u_n_c_t_i_o_n            Specifies the function to be invoked
                         when the named key is pressed.
     You can specify any of the following control keys (their
     abbreviations are in parentheses):

     Ctrl (c)
     Lock (l)

     Meta (Compose Character) (m)
     Shift (s)

     You can specify the following mouse buttons:

     Btn1 (by default, the left mouse button)
     Btn2 (by default, the middle mouse button)

     Btn3 (by default, the right mouse button)

     You can assign the following actions to mouse buttons:

     Down                Action is invoked when the button is
                         pressed.

     Up                  Action is invoked when the button is
                         released.

     PtrMoved            Action is invoked when the mouse button
                         is down and the pointer is moved.

     You can specify the following functions:

     backward-character  Moves backward one character.

     backward-kill-word  Kills the word before the insertion
                         point.  This text can be recovered with
                         the unkill function.

     backward-paragraph  Moves backward one paragraph.

     backward-word       Moves backward one word.

     beginning-of-file   Moves to the beginning of the text.

     beginning-of-line   Moves to the beginning of the current
                         line.

     delete-next-character
                         Deletes the character after the inser-
                         tion point.

     delete-next-word    Deletes the word after the insertion
                         point.



10






                                                            X(1X)



     delete-previous-character
                         Deletes the character before the inser-
                         tion point.

     delete-previous-word
                         Deletes the word before the insertion
                         point.

     delete-selection    Deletes the selection.

     end-of-file         Moves to the end of the text.

     end-of-line         Moves to the end of the current line.

     extend-adjust       Adjusts the extension of the selected
                         text.

     extend-end          Ends the extension of the selected text.

     extend-start        Begins the extension of the selected
                         text.

     forward-character   Moves forward one character.

     forward-paragraph   Moves forward one paragraph.

     forward-word        Moves forward one word.

     insert-file         Inserts a file into the text.

     kill-selection      Kills the selection.  This text can be
                         recovered with the unkill function.

     kill-to-end-of-line Kills from the insertion point to the
                         end of the line.  This text can be
                         recovered with the unkill function.

     kill-to-end-of-paragraph
                         Kills from the insertion point to the
                         end of the paragraph.  This text can be
                         recovered with the unkill function.

     kill-word           Kills the word after the insertion
                         point.  This text can be recovered with
                         the unkill function.

     newline-and-backup  Creates a new paragraph, leaving the
                         insertion point on the previous one.

     newline-and-indent  Creates a new paragraph with the same
                         indentation as the current one.




                                                               11






X(1X)



     newline             Creates a new paragraph.

     next-line           Moves down one line.

     next-page           Moves to the next screen of text.

     previous-line       Moves up one line.

     previous-page       Moves to the previous screen of text.

     redraw-display      Repaints the window.

     scroll-one-line-down
                         Scrolls the text down one line.

     scroll-one-line-up  Scrolls the text up one line.

     select-adjust       Adjusts the selection.

     select-all          Selects all the text.

     select-end          Ends the selection.

     select-start        Begins the selection.

     select-word         Selects the word the insertion point is
                         in.

     stuff               Inserts the text that was last selected
                         from any window.

     unkill              Inserts the text that was last killed.
                         (There is no way to get back text that
                         was deleted.)

     A function specification can also include a character in
     single quotation marks or a string in double quotation
     marks.  A string in quotation marks instructs the applica-
     tion to insert the specified string into the file. For exam-
     ple, the following function instructs the application to
     insert the string "abcdef" into the text, insert the current
     selection into the text, and then insert the letter q when
     CTRL/Q is pressed.

          cq:  "abcdef" stuff 'q'


     A sample set of key bindings in the .Xdefaults file is as
     follows:

     #
     # toolkit text bindings
     #



12





                                                            X(1X)



     *Text.translations:Ctrl<Key>f:forward-character()
     Ctrl<Key>b:    backward-character()
     Meta<Key>f:    forward-word()
     Meta<Key>b:    backward-word()
     Meta<Key>]:    forward-paragraph()
     Ctrl<Key>[:    backward-paragraph()
     Ctrl<Key>a:    beginning-of-line()
     Ctrl<Key>e:    end-of-line()
     Ctrl<Key>n:    next-line()
     Ctrl<Key>p:    previous-line()
     Ctrl<Key>v:    next-page()
     Meta<Key>v:    previous-page()
     Meta<Key>\<:   beginning-of-file()
     Meta<Key>\>:   end-of-file()
     Ctrl<Key>z:    scroll-one-line-up()
     Meta<Key>z:    scroll-one-line-down()
     Ctrl<Key>d:    delete-next-character()
     Ctrl<Key>h:    delete-previous-character()
     ~Shift Meta<Key>d:delete-next-word()
     ~Shift Meta<Key>h:delete-previous-word()
     Ctrl<Key>w:    kill-selection()
     Meta<Key>y:    stuff()
     Ctrl<Key>m:    newline()
     Ctrl<Key>l:    redraw-display()
     Any<Key>:      self-insert()






























                                                               13






X(1X)



     Meta<Btn1Down>:extend-start()
     Meta Button1<PtrMoved>:extend-adjust()
     Meta<Btn1Up>:  extend-end()
     Meta<Btn2Down>:stuff()

FILES
     ~/.Xdefaults

SEE ALSO
     bitmap(1X), dxcalendar(1X), dxclock(1X), dxcalc(1X),
     dxcardfiler(1X) dxmail(1X), dxnotepad(1X), dxterm(1X),
     dxwm(1X), uwm(1X), xedit(1X), xfd(1X), xhost(1X), xload(1X),
     xmh(1X), xset(1X), xsetroot(1X), xwininfo(1X)














    







    



















14