/dokey

Usage:

/DOKEY name


Performs an action that is intended to be invoked from a keybinding created with /bind or /def -b. Most of the actions not meaningful or useful when the /dokey command is executed from the command line.

  Name		Default binding	  Action
  ----		---------------	  --------
  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		(none)		  Cursor up
  DOWN		(none)		  Cursor down
  RIGHT		key_right	  Cursor right
  LEFT		key_left	  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		  Redraw screen
  CLEAR		^[^L		  Clear 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
  PAUSE		^S		  Pause screen
  PAGE		key_tab		  Scroll 1 page forward ("more")
  PAGEBACK	(none)		  Scroll 1 page backward ("more")
  HPAGE		^X]		  Scroll half page forward ("more")
  HPAGEBACK	^X[		  Scroll half page backward ("more")
  PGDN		key_pgdn	  /dokey_hpage
  PGUP		key_pgup	  /dokey_hpageback
  LINE		^[^N		  Scroll forward 1 line ("more")
  LINEBACK	^[^P		  Scroll backward 1 line ("more")
  FLUSH		^[j		  Jump to end of scroll buffer
  SELFLUSH	^[J		  Show lines with attributes,
				      and jump to end of buffer

A default of "(stty)" means the key sequence is that used by your terminal driver. A default of the form "key_name" means the key named name (see keybindings).

The return value of /dokey depends on the action. The movement and deletion actions return the new position of the cursor; the scrolling actions return the number of lines scrolled. The return values of other actions aren't very useful.

See "keybindings" for a complete list of keybindings.

Example:

  /bind ^B = /dokey RECALLB
  /bind ^F = /dokey RECALLF
Then, ^B and ^F could be used to recall input backwards and forwards.

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


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys