Add function to prevent accidental pressing both < and >


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Temple Termagant

Posts: 9

Joined: Saturday, 10th October 2015, 11:54

Post Wednesday, 16th January 2019, 17:43

Add function to prevent accidental pressing both < and >

What title says, add some function that will make it so, if you press both < and >, the game will ignore the imput that acts second so you dont go up and immidiately down (or vice versa), because it ruins lives.

Slime Squisher

Posts: 392

Joined: Sunday, 11th September 2016, 17:21

Post Wednesday, 16th January 2019, 18:15

Re: Add function to prevent accidental pressing both < and >

That would be rather awkward to implement cleanly. Programs receive separate events for each keystroke (excepting modifiers like CTRL), so the program wouldn't see < and > being pressed at the same time, but one being pressed after the other. It can't just ignore the second keystroke either, because sometimes players legitimately want to backtrack across stairs, for example when a player descends to a new floor and is surrounded by nasty enemies that they would rather try to lure 1 at a time from a safer location than fight while surrounded.

If this is a problem that needs a solution, then at best, there could be a confirmation prompt on the second keypress, but I would want it to be optional, as I've never accidentally double-crossed a staircase, but I've done it intentionally many times.

Edit: Actually, it might be possible to check the status of the other key at the time when one is pressed, and if so, ignore it. It's been too long since I've messed with that functionality to remember if it's possible, but my guess is that it probably is.

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Wednesday, 16th January 2019, 18:29

Re: Add function to prevent accidental pressing both < and >

Technical issues aside (it would be kind of annoying to implement this), my immediate reaction is that there's only so many kinds of miskeys we can protect the player from, and that if this is a mistake you are regularly making, you might consider playing a bit more slowly :) . If that's not an option, perhaps consider reassigning one of the two somewhere else on the keyboard so they aren't adjacent.
User avatar

Lair Larrikin

Posts: 15

Joined: Friday, 6th June 2014, 23:17

Location: Belarus

Post Wednesday, 16th January 2019, 21:06

Re: Add function to prevent accidental pressing both < and >

Game should ask confirmation if going down- or upstairs happened to be the first action after using stairs, as it is often accidental.
User avatar

Zot Zealot

Posts: 982

Joined: Monday, 29th September 2014, 09:04

Post Thursday, 17th January 2019, 00:08

Re: Add function to prevent accidental pressing both < and >

I wouldn't like confirmation for <> / ><, as that's quite a common action while stairdancing.

The option autofight_warning can possibly be generalised to help. A setting called minimum_key_delay could be created which would prevent processing sequential key presses with too little time between them (perhaps the default could be 100ms or so).

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Thursday, 17th January 2019, 01:20

Re: Add function to prevent accidental pressing both < and >

This happens to me very often with the default controls.

My suggestion is to combine the two commands and only have one key bound to them by default. The same square can't have both an up and down staircase on it, so there's no need for two commands. Make '>' the default key for "interact with the feature on this square" (stairs, portals, altars, shops, etc) and don't bind '<' to anything by default. This prevents the miskey issue since if you press both < and > at once it is the same as just pressing >.

For this message the author duvessa has received thanks:
njvack
User avatar

Tartarus Sorceror

Posts: 1762

Joined: Monday, 14th October 2013, 01:05

Post Thursday, 17th January 2019, 02:23

Re: Add function to prevent accidental pressing both < and >

How would you automatically path to up or down staircases from the X view then?

Also I'm curious in what situation people are running into this happening, I don't think it's ever happened to me.

For this message the author Shard1697 has received thanks:
duvessa
User avatar

Barkeep

Posts: 4435

Joined: Tuesday, 11th January 2011, 12:28

Post Thursday, 17th January 2019, 14:39

Re: Add function to prevent accidental pressing both < and >

I've fat-fingered both < and > at the same time by accident a few times. For normal movement (which I occasionally mess up too) it's generally not a super big deal but stairs take a long time and moving across levels generally has much bigger consequences than moving a single square.

Regarding X (and G), I think you could still use < and > in those modes while using > to interact with features. It's a little weird but not that weird.
I am not a very good player. My mouth is a foul pit of LIES. KNOW THIS.

For this message the author njvack has received thanks:
VeryAngryFelid

Ziggurat Zagger

Posts: 4432

Joined: Friday, 8th May 2015, 17:51

Post Thursday, 17th January 2019, 15:53

Re: Add function to prevent accidental pressing both < and >

As a person who sometimes fat-fingers < and > I still think always using > to use stairs will lead to more problems, it is easier to "double press" > than fat-finger < and >.
Underestimated: cleaving, Deep Elf, Formicid, Vehumet, EV
Overestimated: AC, GDS
Twin account of Sandman25

Abyss Ambulator

Posts: 1193

Joined: Friday, 16th January 2015, 20:20

Post Thursday, 17th January 2019, 17:42

Re: Add function to prevent accidental pressing both < and >

Why not add a force_more_message?

Tomb Titivator

Posts: 809

Joined: Wednesday, 19th June 2013, 09:31

Post Sunday, 20th January 2019, 02:00

Re: Add function to prevent accidental pressing both < and >

I've never done what you describe, but I added the following to my RC a while ago

  Code:
force_more_message += comes? into view


Some people called annoying... And it can be tedious pressing space a bunch of times in big fights. However, it forces me to pause when I sometimes wouldn't have before and so I find it very useful.

Slime Squisher

Posts: 344

Joined: Tuesday, 14th April 2015, 19:56

Location: France

Post Sunday, 20th January 2019, 11:10

Re: Add function to prevent accidental pressing both < and >

French keyboards have < and > on the same key (shift-separated)
3 runes : MiMo^Ru, HOFi^Beogh, TrMo^Yredelemnul, GrFi^Ru, FoFi^Gozag, MiGl^Okawaru
4 runes : DDFi^Makhleb
5 runes : GrEE^Vehumet
15 runes : MiFi^Ru, NaWz^Sif Muna, GrWz^Sif Muna
I mostly play offline or online on CXC

For this message the author Fingolfin has received thanks:
runewalsh

Mines Malingerer

Posts: 53

Joined: Sunday, 2nd April 2017, 11:16

Post Sunday, 10th February 2019, 13:59

Re: Add function to prevent accidental pressing both < and >

Actually, I was just thinking about this yesterday: why not just have ONE command for ascending or descending stairs? Stairs in DCSS are never double, they always either lead up or down, so why differentiate the command? Just have < or > mean "climb up or down stairway/pit/escape hatch"
MM

Zot Zealot

Posts: 1004

Joined: Thursday, 16th August 2018, 21:19

Post Monday, 11th February 2019, 16:30

Re: Add function to prevent accidental pressing both < and >

VeryAngryFelid wrote:As a person who sometimes fat-fingers < and > I still think always using > to use stairs will lead to more problems, it is easier to "double press" > than fat-finger < and >.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 24 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.