home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
word
/
text
/
024
/
default.h
< prev
next >
Wrap
Text File
|
1993-06-04
|
20KB
|
390 lines
/*
* New editor name: TDE, the Thomson-Davis Editor.
* Author: Frank Davis
* Date: June 5, 1991
*
* This modification of Douglas Thomson's code is released into the
* public domain, Frank Davis. You may distribute it freely.
*
* Set up default dispatch table.
*
* If you want to change the default key assignments - it's really easy. All
* you have to do is set the appropriate array element to the desired function
* and then recompile the source code. The available functions are in the
* define.h file.
*
* The key code returned by pressing a function key is added to 256. This is
* done because it makes it easy to allow the ASCII and Extended ASCII
* characters to get thru as normal characters and to trap the function keys
* because they are greater than 256. Once a function is detected, 256 is
* subtracted from the key code, which maps the function key codes to
* 0-256 (MAX_KEYS). See function getfunc( ) in console.c.
*
* Look in the back of the MSC 6.0a manual or a MASM manual to find out what
* the extended codes are for the various key combinations. For example,
* ALT+M = 50. Add 50 to 256 which equals 306.
*
* **************************************************************************
* **** In tde, version 1.4, I added support for assigning characters ****
* **** to Control and Alt keys. This allows those who need various ****
* **** accent and dot characters to assign any ASCII or Extended ASCII ****
* **** character to unused function keys. ****
* **************************************************************************
*
* **************************************************************************
* **** In tde, version 1.5, I took out support for assigning characters ****
* **** to Control and Alt keys. Macros may now be assigned to function ****
* **** keys, which will accomplish the same task. ****
* **************************************************************************
*
* If you change the default key assignments, you should also change the help
* screen in help.h to show what function the new keys are assigned to.
*
* The insert_overwrite function is assigned the index of 0. If the key
* code is less than 256 then a character is written to the file. DO NOT
* assign any function to 256, it is used to call insert_overwrite( ) and
* add text characters to the file. DO NOT put an index to it in the
* cfgkeys utility.
*
* See the end of this file for default two-key assignments.
*/
KEY_FUNC key_func = {
"$ keys", /* signature for the .exe file */
/* 256 */
0, /* DO NOT assign this to any function */
0, /* Alt + ESC - 101 Keyboard */
AbortCommand, /* ESC - manually map to 258 */
0, /* #ESC - manually map to 259 */
/* 260 */
ClearAllMacros, /* ^ESC - mannuall map to 260 */
0, /* no key assigned here */
Rturn, /* Enter - manually map to 262 */
NextLine, /* #Enter - manually map to 263 */
BegNextLine, /* ^Enter - manually map to 264 */
BackSpace, /* BackSpace - manually map to 265 */
BackSpace, /* #BackSpace - manually map to 266 */
0, /* ^BackSpace - manually map to 267 */
Tab, /* Tab - manually map to 268 */
0, /* Control-Break - manually map to 269
* DO NOT assign any function to Control-Break.
* It is used to stop run away functions.
*/
/* 270 */
0, /* Alt + Backspace - 101 keyboard */
BackTab, /* Shift + Tab */
Quit, /* Alt-Q 272 */
BlockToFile, /* Alt-W 273 */
BlockExpandTabs, /* Alt-E 274 */
ToggleRuler, /* Alt-R 275 */
BlockTrimTrailing, /* Alt-T 276 */
UndoDelete, /* ALT-Y 277 */
UnMarkBlock, /* Alt-U 278 */
ToggleIndent, /* Alt-I 279 */
/* 280 */
OverlayBlock, /* Alt-O 280 */
PrintBlock, /* Alt-P 281 */
0, /* Alt-[ - 101 keyboard */
0, /* Alt-] - 101 keyboard */
0, /* Alt-Enter - 101 keyboard */
0, /* manually map Grey Enter to this hole */
AddLine, /* Alt-A 286 */
SortBoxBlock, /* Alt-S 287 */
DeleteLine, /* Alt-D 288 */
FillBlock, /* Alt-F 289 */
/* 290 */
DeleteBlock, /* Alt-G 290 */
Help, /* Alt-H 291 */
JoinLine, /* Alt-J 292 */
KopyBlock, /* Alt-K 293 */
MarkLine, /* Alt-L 294 */
0, /* Alt-;: - 101 keyboard */
0, /* Alt-'" - 101 keyboard */
0, /* Alt-`~ - 101 keyboard */
0, /* manually map Shift+Grey Enter to this hole */
0, /* manually map Control+Greay Enter to this hole */
/* 300 */
ToggleZ, /* Alt-Z 300 */
MarkStream, /* Alt-X 301 */
CopyBlock, /* Alt-C 302 */
ToggleWordWrap, /* Alt-V 303 */
MarkBox, /* Alt-B 304 */
NumberBlock, /* Alt-N 305 */
MoveBlock, /* Alt-M 306 */
BlockUpperCase, /* Alt-< added for 83/84 keyboards, fmd */
BlockLowerCase, /* Alt-> added for 83/84 keyboards, fmd */
BlockStripHiBit, /* ALt-? added for 83/84 keyboards, fmd */
/* 310 */
0, /* hole in key codes, not used */
0, /* hole in key codes, not used */
0, /* hole in key codes, not used */
0, /* hole in key codes, not used */
0, /* hole in key codes, not used */
Help, /* F1 315 */
Save, /* F2 316 */
Quit, /* F3 317 */
File, /* F4 318 */
RepeatFindForward1, /* F5 319 */
/* 320 */
RepeatFindBackward1, /* F6 320 */
RepeatFindRegX, /* F7 321 */
SplitVertical, /* F8 322 */
SplitHorizontal, /* F9 323 */
NextWindow, /* F10 324 */
0, /* hole in key codes, not used */
0, /* hole in key codes, not used */
BegOfLine, /* Home 327 */
LineUp, /* Up 328 */
ScreenUp, /* PgUp 329 */
/* 330 */
0, /* hole in key codes, not used */
CharLeft, /* Left 331 */
CenterWindow, /* Center 332 */
CharRight, /* Right 333 */
0, /* hole in key codes, not used */
EndOfLine, /* End 335 */
LineDown, /* Down 336 */
ScreenDown, /* PgDn 337 */
ToggleOverWrite, /* Ins 338 */
DeleteChar, /* Del 339 */
/* 340 */
SaveMacro, /* Shift F1 */
SaveAs, /* Shift F2 */
LoadMacro, /* Shift F3 */
EditFile, /* Shift F4 */
FindForward, /* Shift F5 */
FindBackward, /* Shift F6 */
FindRegX, /* Shift F7 */
ReplaceString, /* Shift F8 */
SizeWindow, /* Shift F9 */
PreviousWindow, /* S