/dokey

Usage:

/DOKEY name


Executes the function of the edit key name. Most of the edit key functions are not meaningful when the /dokey command is executed from the regular command line, but are intended to be called from a keybinding created with /bind or /def -b.

  Name		Default binding	  Function
  ----		---------------	  --------
  BSPC		(stty), ^H, ^?	  Backspace
  BWORD		(stty), ^W	  Delete previous word
  DLINE		(stty), ^U	  Delete entire line
  REFRESH	(stty), ^R	  Refresh line
  LNEXT		(stty), ^V	  Ignore any binding next key might have

  UP		(termcap), ^[[A	  Cursor up
  DOWN		(termcap), ^[[B	  Cursor down
  RIGHT		(termcap), ^[[C	  Cursor right
  LEFT		(termcap), ^[[D	  Cursor left

  NEWLINE	^J, ^M		  Execute current line
  RECALLB	^P		  Recall previous input line
  RECALLF	^N		  Recall next input line
  RECALLBEG	^[<		  Recall first input line
  RECALLEND	^[>		  Recall last input line
  SEARCHB	^[p		  Search backward in input history
  SEARCHF	^[n		  Search forward in input history
  SOCKETB	^[b		  Switch to previous socket
  SOCKETF	^[f		  Switch to next socket
  DWORD		^[d		  Delete word
  DCH		^D		  Delete character under cursor
  REDRAW	^L		  Clear/redraw screen
  HOME		^A		  Go to beginning of line
  END		^E		  Go to end of line
  WLEFT		^B		  Go left, to beginning of word
  WRIGHT	^F		  Go right, to end of word
  DEOL		^K		  Delete from cursor to end of line
  PAGE		^I		  Scroll 1 page ("more")
  HPAGE		^[h		  Scroll half page ("more")
  LINE		^[L		  Scroll 1 line ("more")
  FLUSH		^[j		  Discard all queued lines.
  SELFLUSH	^[J		  Discard queued lines without attributes.

A default of "(stty)" means the key sequence is that used by your terminal driver. A default of "(termcap)" means the key sequence is that given in the termcap entry for %TERM.

The return value of /dokey depends on the function. The movement and deletion functions return the new position of the cursor. The return values of other functions aren't very useful.

See "keybindings" for a complete list of keybindings.

Example:

  /bind ^? = /dokey BSPC
  /bind ^H = /dokey BSPC
Both ^H and DEL could then be used to do backspacing (this is already done by default).

See: keybindings, general, sockets, history, /bind, /more


Back to index
Back to tf home page
Copyright © 1995 - 1999 Ken Keys