win32tty keystroke handling
- Move the code for keystroke handling into its own source file. - Compile and link it as a dynamic link library. - Dynamically load the keystroke handler at runtime - Add support for specifying a different handler in defaults.nh so that internationalization issues can be dealt with without rebuilding nethack, just supply alternative handlers in HACKDIR. The following exported functions need to be present in the keystroke handler .dll: ProcessKeystroke - returns an ascii value to NetHack NHkbhit - allows peeking to see if a key/mouse press is waiting SourceWhere - returns location for souce code for a keystroke handler SourceAuthor - returns author information for a keystroke handler KeyHandlerName - returns the full or short name of the keystroke handling dll.
This commit is contained in:
@@ -262,6 +262,10 @@ struct instance_flags {
|
||||
|
||||
boolean cmdassist; /* provide detailed assistance for some commands */
|
||||
boolean obsolete; /* obsolete options can point at this, it isn't used */
|
||||
#ifdef WIN32CON
|
||||
#define MAX_ALTKEYHANDLER 25
|
||||
char altkeyhandler[MAX_ALTKEYHANDLER];
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user