version 1.5, 2000/04/13 06:12:18 |
version 1.6, 2000/09/01 14:59:09 |
|
|
* Created: 22-Nov-1987 Mic Kaczmarczik (mic@emx.cc.utexas.edu) |
* Created: 22-Nov-1987 Mic Kaczmarczik (mic@emx.cc.utexas.edu) |
*/ |
*/ |
|
|
#include "def.h" |
#include "def.h" |
#include "kbd.h" |
#include "kbd.h" |
|
|
#ifdef XKEYS |
#ifdef XKEYS |
#include <term.h> |
#include <term.h> |
|
|
#ifdef FKEYS |
#ifdef FKEYS |
/* |
/* |
|
|
*/ |
*/ |
|
|
char *keystrings[] = {NULL}; |
char *keystrings[] = {NULL}; |
#endif |
#endif /* FKEYS */ |
|
|
/* |
/* |
* Turn on function keys using keypad_xmit, then load a keys file, if |
* Turn on function keys using keypad_xmit, then load a keys file, if |
* available. The keys file is located in the same manner as the startup |
* available. The keys file is located in the same manner as the startup |
* file is, depending on what startupfile() does on your system. |
* file is, depending on what startupfile() does on your system. |
*/ |
*/ |
extern int ttputc(); |
void |
|
|
ttykeymapinit() |
ttykeymapinit() |
{ |
{ |
extern int dobindkey(); /* XXX */ |
char *cp; |
char *cp; |
|
#ifdef FKEYS |
#ifdef FKEYS |
/* Bind keypad function keys. */ |
/* Bind keypad function keys. */ |
if (key_left) |
if (key_left) |
|
|
dobindkey(map_table[0].p_map, "scroll-up", key_npage); |
dobindkey(map_table[0].p_map, "scroll-up", key_npage); |
if (key_ppage) |
if (key_ppage) |
dobindkey(map_table[0].p_map, "scroll-down", key_ppage); |
dobindkey(map_table[0].p_map, "scroll-down", key_ppage); |
#endif |
#endif /* FKEYS */ |
|
|
#ifndef NO_STARTUP |
#ifndef NO_STARTUP |
if (cp = gettermtype()) { |
if ((cp = gettermtype())) { |
extern char *startupfile(); |
if (((cp = startupfile(cp)) != NULL) && (load(cp) != TRUE)) |
if (((cp = startupfile(cp)) != NULL) |
|
&& (load(cp) != TRUE)) |
|
ewprintf("Error reading key initialization file"); |
ewprintf("Error reading key initialization file"); |
} |
} |
#endif |
#endif /* !NO_STARTUP */ |
if (keypad_xmit) /* turn on keypad */ |
if (keypad_xmit) |
|
/* turn on keypad */ |
putpad(keypad_xmit, 1); |
putpad(keypad_xmit, 1); |
} |
} |
|
|
/* |
/* |
* Clean up the keyboard -- called by tttidy() |
* Clean up the keyboard -- called by tttidy() |
*/ |
*/ |
|
void |
ttykeymaptidy() |
ttykeymaptidy() |
{ |
{ |
|
|
if (keypad_local) |
if (keypad_local) |
putpad(keypad_local, 1); /* turn off keypad */ |
/* turn off keypad */ |
|
putpad(keypad_local, 1); |
} |
} |
|
|
#endif |
#endif /* XKEYS */ |