GUI Tricks and Tips

Helpful Key Bindings when editing a GUI Entry

When entering values in an Entry like the PinMatch/Label Fields in the Legacy SDL Editor, or in any CSET Entry Field, there are many key useful key short cuts that do not match the normal Windows key mappings like Control-C or copy or Control-X to cut…

For those familiar with the Emacs Text Editor, the key bindings are mostly lifted from there.

Note that Meta- key combinations are entered by first pressing the ‘Esc’ key and then pressing the key so Meta-w (which is equivalent to Windows Control-C or copy ) means press ESC (let go) and then press 'w'

Mouse Button 1 Single Click

Clicking mouse button 1 positions the insertion cursor just before the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the mouse.

Mouse Button 1 Double Click

Double-clicking with mouse button 1 selects the word under the mouse and positions the insertion cursor at the beginning of the word. Dragging after a double click will stroke out a selection consisting of whole words.

Mouse Button 1 Triple Click

Triple-clicking with mouse button 1 selects all of the text in the entry and positions the insertion cursor before the first character.

Shift Mouse Button 1 Drag

The ends of the selection can be adjusted by dragging with mouse button 1 while the Shift key is down; this will adjust the end of the selection that was nearest to the mouse cursor when button 1 was pressed. If the button is double-clicked before dragging then the selection will be adjusted in units of whole words.

Control-Mouse Button 1

Clicking mouse button 1 with the Control key down will position the insertion cursor in the entry without affecting the selection.

Middle Mouse Button Drag

The view in the entry can be adjusted by dragging with mouse button 2. If mouse button 2 is clicked without moving the mouse, the selection is copied into the entry at the position of the mouse cursor.

Mouse Button 1 Drag

If the mouse is dragged out of the entry on the left or right sides while button 1 is pressed, the entry will automatically scroll to make more text visible (if there is more text off-screen on the side where the mouse left the window).

Left and Right Arrows

The Left and Right keys move the insertion cursor one character to the left or right; they also clear any selection in the entry and set the selection anchor. If Left or Right is typed with the Shift key down, then the insertion cursor moves and the selection is extended to include the new character. Control-Left and Control-Right move the insertion cursor by words, and Control-Shift-Left and Control-Shift-Right move the insertion cursor by words and also extend the selection. Control-b and Control-f behave the same as Left and Right, respectively. Meta-b and Meta-f behave the same as Control-Left and Control-Right, respectively.

Home, Control-A move to beginning of Entry

The Home key, or Control-a, will move the insertion cursor to the beginning of the entry and clear any selection in the entry.

Shift-Home moves the insertion cursor to the beginning of the entry and also extends the selection to that point.

End, Control-E move to end of entry

The End key, or Control-e, will move the insertion cursor to the end of the entry and clear any selection in the entry.

Shift-End moves the cursor to the end and extends the selection to that point.

Control-Space

The Select key and Control-Space set the selection anchor to the position of the insertion cursor. They don't affect the current selection. Shift-Select and Control-Shift-Space adjust the selection to the current position of the insertion cursor, selecting from the anchor to the insertion cursor if there was not any selection previously.

Select All Text in Entry Control-'/'

Control-/ selects all the text in the entry.

Clear Selection in Entry Control-'\'

Control-\ clears any selection in the entry.

Delete Key

The Delete key deletes the selection, if there is one in the entry. If there is no selection, it deletes the character to the right of the insertion cursor.

BackSpace Key and Control-h

The BackSpace key and Control-h delete the selection, if there is one in the entry. If there is no selection, it deletes the character to the left of the insertion cursor.

Delete Character Control-d

Control-d deletes the character to the right of the insertion cursor.

Delete Word Meta-d

Meta-d deletes the word to the right of the insertion cursor.

Delete to End Control-k

Control-k deletes all the characters to the right of the insertion cursor.

Control-t

Control-t reverses the order of the two characters to the right of the insertion cursor.

These are supposed to work but don't…

Copy to clipboard Meta-w

The F16 key (labelled Copy on many Sun workstations) or Meta-w copies the selection in the widget to the clipboard, if there is a selection.

Cut Control-w

The F20 key (labelled Cut on many Sun workstations) or Control-w copies the selection in the widget to the clipboard and deletes the selection. If there is no selection in the widget then these keys have no effect.

Paste Control-y

The F18 key (labelled Paste on many Sun workstations) or Control-y inserts the contents of the clipboard at the position of the insertion cursor.