![]() |
#1 |
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
Code fix for the "slow ESC" key input in old variants?
Old variants such as Hellband and Zangband process ESC key input only after a momentary delay, at least in Curses mode; the "tilde" key just below ESC does the same thing, but operates immediately.
Is there a general code fix for the slow ESC key input in these variants?
__________________
My roguelike gameplay videos Last edited by smbhax; January 22, 2022 at 02:11. |
![]() |
![]() |
![]() |
#2 |
Knight
Join Date: Jan 2017
Posts: 919
![]() |
seems like it was fixed some time between vanilla 3.2.0 and vanilla 3.4.1. I daren't check 3.3.0 right now
|
![]() |
![]() |
![]() |
#3 |
Prophet
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,578
![]() |
If its the same problem oangband has I get round it by macro-ing the escape key to the escape key. Don't know why that works, just seems to.
|
![]() |
![]() |
![]() |
#4 | |
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
Quote:
Oh that's interesting. I tried doing some kind of ESC/tilde keymap in Zangband but couldn't seem to get it to take, same with an ESC-ESC one. I don't know my way around macros very well, though.
__________________
My roguelike gameplay videos |
|
![]() |
![]() |
![]() |
#5 |
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
Current Angband has a section in src/main-gcu.c starting with this disclaimer
Code:
/* This might be a bad idea, but... * * Here we try to second-guess ncurses. In some cases, keypad() mode will * fail to translate multi-byte escape sequences into things like number- * pad actions, function keys, etc. So we can hardcode a small list of some * of the most common sequences here, just in case. Code:
case 27: i = ESCAPE; break; Angband's also has Code:
/* We do it like this to prevent a link error with curseses that * lack ESCDELAY. */ if (!getenv("ESCDELAY")) { #if _POSIX_C_SOURCE < 200112L static char escdelbuf[80] = "ESCDELAY=20"; putenv(escdelbuf); #else setenv("ESCDELAY", "20", 1); #endif }
__________________
My roguelike gameplay videos Last edited by smbhax; January 23, 2022 at 04:20. |
![]() |
![]() |
![]() |
#6 |
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
I went to try out the releases in this range but for all of them got "multiple definitions" compile errors concerning z-file.h or z-term.h, so I have been of no use.
__________________
My roguelike gameplay videos |
![]() |
![]() |
![]() |
#7 |
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
In build notes, the only thing that jumped out at me--not that I know that I'm looking for--is that 3.4.0 included "Upgrade to UTF-8."
Oh and "Fix GCU port to recognise backspace and del as distinct keys."
__________________
My roguelike gameplay videos |
![]() |
![]() |
![]() |
#8 | ||
Adept
Join Date: Oct 2021
Location: WA
Posts: 211
![]() |
Modern ESC key support was added to Angband by stefanor@cox.net on January 22, 2009 in https://github.com/angband/angband/c...f76cc30dcb9bc5
Their description of that commit is Quote:
It went out in Angband 3.1.1, 26th July 2009, noted specifically as Quote:
For an example of how it was incorporated into a variant that had forked from an earlier version of Angband: PosChengband incorporated it on February 25, 2015 as "Curses Port: Fix unacceptable delay on ESC keypress" https://github.com/NickMcConnell/pos...6af5a176ec0661, with changes to main-gcu.c, util.c, and externs.h; there were also changes to Makefile, main.c, and z-config.h in that commit, but those may have been incidental.
__________________
My roguelike gameplay videos Last edited by smbhax; February 1, 2022 at 01:46. |
||
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
roguelike keyset targeting mode: "k" key (up) only works in uppercase "K" | yendor | Vanilla | 2 | October 6, 2021 02:31 |
Bug: "n" not counted as a non-"ESC" key | chikinn | Vanilla | 3 | November 8, 2014 22:34 |
Bug with "Turn" in the "Player History" dump | bron | Vanilla | 3 | January 17, 2014 16:35 |
(Hopefully) useful code snippet modifies "]" command to highlight unidentified items | Max Stats | Vanilla | 31 | January 11, 2011 21:12 |
"repeat" Command just little bit "smarter" | ClaytonAguiar | Vanilla | 8 | June 17, 2009 15:01 |