(from Yitzhak)
patch: rollback alt-key changes
This commit is contained in:
+9
-10
@@ -27,19 +27,19 @@ Some options are applicable only to the graphical port.
|
|||||||
These are discussed separately in their own section.
|
These are discussed separately in their own section.
|
||||||
|
|
||||||
Contents
|
Contents
|
||||||
1. Available ALT Key Combinations
|
1. Available NetHack Mode ALT Key Combinations
|
||||||
2. Boolean options
|
2. Boolean options
|
||||||
3. Graphical Port Complex options
|
3. Graphical Port Complex options
|
||||||
4. Graphical Port Additional/Enhanced Commands
|
4. Graphical Port Additional/Enhanced Commands
|
||||||
5. Graphical Port Menus
|
5. Graphical Port Menus
|
||||||
|
|
||||||
1. Available ALT Key Combinations
|
1. Available NetHack Mode ALT Key Combinations
|
||||||
---------------------------------
|
----------------------------------------------
|
||||||
While playing NetHack under Windows you can press the ALT key in
|
While playing NetHack under Windows in NetHack mode you can press the
|
||||||
combination with another key to execute an extended command as an
|
ALT key in combination with another key to execute an extended command
|
||||||
alternative method to pressing a # key sequence. (The non-graphical
|
as an alternative method to pressing a # key sequence. The non-graphical
|
||||||
(tty) version is always running in NetHack mode, but
|
(tty) version is always running in NetHack mode, but
|
||||||
"NetHack for Windows - Graphical Interface" can be toggled):
|
"NetHack for Windows - Graphical Interface" can be toggled:
|
||||||
|
|
||||||
Alt-2 #twoweapon - toggle two-weapon combat (unavailable
|
Alt-2 #twoweapon - toggle two-weapon combat (unavailable
|
||||||
if number_pad mode is set)
|
if number_pad mode is set)
|
||||||
@@ -47,18 +47,17 @@ alternative method to pressing a # key sequence. (The non-graphical
|
|||||||
Alt-c #chat - talk to someone or something.
|
Alt-c #chat - talk to someone or something.
|
||||||
Alt-d #dip - dip an object into something.
|
Alt-d #dip - dip an object into something.
|
||||||
Alt-e #enhance - enhance your skill with a weapon.
|
Alt-e #enhance - enhance your skill with a weapon.
|
||||||
Alt-f #force - force a lock. [works in NetHack mode only]
|
Alt-f #force - force a lock.
|
||||||
Alt-i #invoke - invoke an object's powers.
|
Alt-i #invoke - invoke an object's powers.
|
||||||
Alt-j #jump - jump to a location.
|
Alt-j #jump - jump to a location.
|
||||||
Alt-l #loot - loot a box on the floor.
|
Alt-l #loot - loot a box on the floor.
|
||||||
Alt-m #monster - use a monster's special ability.
|
Alt-m #monster - use a monster's special ability.
|
||||||
[works in NetHack mode only]
|
|
||||||
Alt-n #name - name an item or type of object.
|
Alt-n #name - name an item or type of object.
|
||||||
Alt-o #offer - offer a sacrifice to the gods.
|
Alt-o #offer - offer a sacrifice to the gods.
|
||||||
Alt-p #pray - pray to the gods for help.
|
Alt-p #pray - pray to the gods for help.
|
||||||
Alt-q #quit - quit the game. (Same as #quit)
|
Alt-q #quit - quit the game. (Same as #quit)
|
||||||
Alt-r #rub - rub a lamp.
|
Alt-r #rub - rub a lamp.
|
||||||
Alt-s #sit - sit down. [works in NetHack mode only]
|
Alt-s #sit - sit down.
|
||||||
Alt-t #turn - turn undead.
|
Alt-t #turn - turn undead.
|
||||||
Alt-u #untrap - untrap something.
|
Alt-u #untrap - untrap something.
|
||||||
Alt-v #version - list compile time options for this version of
|
Alt-v #version - list compile time options for this version of
|
||||||
|
|||||||
+3
-7
@@ -133,8 +133,7 @@ numpad[KEY_LAST][3] = {
|
|||||||
|
|
||||||
#define IS_MAP_ASCII(mode) ((mode)!=MAP_MODE_TILES && (mode)!=MAP_MODE_TILES_FIT_TO_SCREEN)
|
#define IS_MAP_ASCII(mode) ((mode)!=MAP_MODE_TILES && (mode)!=MAP_MODE_TILES_FIT_TO_SCREEN)
|
||||||
|
|
||||||
static const char *extendedlist_nhmode = "acdefijlmnopqrstuvw?2";
|
static const char *extendedlist = "acdefijlmnopqrstuvw?2";
|
||||||
static const char *extendedlist_winmode = "acdeijlnopqrtuvw?2";
|
|
||||||
|
|
||||||
#define SCANLO 0x02
|
#define SCANLO 0x02
|
||||||
static const char scanmap[] = { /* ... */
|
static const char scanmap[] = { /* ... */
|
||||||
@@ -378,14 +377,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
|
|||||||
If not nethackmode, don't handle Alt-keys here.
|
If not nethackmode, don't handle Alt-keys here.
|
||||||
If no Alt-key pressed it can never be an extended command
|
If no Alt-key pressed it can never be an extended command
|
||||||
*/
|
*/
|
||||||
if ((lParam & 1<<29) != 0)
|
if (GetNHApp()->regNetHackMode && ((lParam & 1<<29) != 0))
|
||||||
{
|
{
|
||||||
unsigned char c = (unsigned char)(wParam & 0xFF);
|
unsigned char c = (unsigned char)(wParam & 0xFF);
|
||||||
unsigned char scancode = (lParam >> 16) & 0xFF;
|
unsigned char scancode = (lParam >> 16) & 0xFF;
|
||||||
if (index(
|
if (index(extendedlist, tolower(c)) != 0)
|
||||||
GetNHApp()->regNetHackMode
|
|
||||||
? extendedlist_nhmode : extendedlist_winmode,
|
|
||||||
tolower(c)) != 0)
|
|
||||||
{
|
{
|
||||||
NHEVENT_KBD(M(tolower(c)));
|
NHEVENT_KBD(M(tolower(c)));
|
||||||
} else if (scancode == (SCANLO + SIZE(scanmap)) - 1) {
|
} else if (scancode == (SCANLO + SIZE(scanmap)) - 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user