Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to quickly clear input line #7177

Open
jmckisson opened this issue Mar 9, 2024 · 5 comments
Open

Add ability to quickly clear input line #7177

jmckisson opened this issue Mar 9, 2024 · 5 comments

Comments

@jmckisson
Copy link
Contributor

Brief summary of issue / Description of requested feature:

It is sometimes necessary to quickly clear the input line in order to type a new command. This is currently possible using multiple keystrokes such as Shift-Home then Down, or by making a key binding that calls clearCmdLine(), but the user is currently unable to bind keys that other mud clients use for this functionality such as Down or Escape.

I propose either allowing Down and/or Escape to be bound as a key, or adding functionality to the Down key to clear the input line if it is not in the state of traversing the command history stack. Additionally it would be useful for the Up key to immediately start traversing the command history regardless if there is typed input on the command line already.

@SlySven
Copy link
Member

SlySven commented Mar 9, 2024

Are you aware that in the meantime it can be cleared automatically after the existing command is issued:
image

On the whole though I suspect this is likely to be tricky to do, because as well as the command history, we also have to accommodate visually impaired users who (IIRC) need to use the arrow keys to interact with their screen-reader and Qt's built-in framework for that which we also have to support.

@jmckisson
Copy link
Contributor Author

Yea I'm aware of that option. But checking that will not solve the problem for example:
I have a command queued up to 'backstab Sampa', but he teleports away and the next best target in the room is Uribam who I wish to immediately type 'trip Uribam'. Sending the backstab command thru to the game would incur game lag as you try to backstab someone who is not there, hence the need to quickly be able to change the command you're trying to send on the fly.

@vadi2
Copy link
Member

vadi2 commented Mar 10, 2024

It is sometimes necessary to quickly clear the input line in order to type a new command.

With Select the text you sent enabled, you can just type one command after another - you don't need to clear the input line. Is there an issue with this for you? This is how everyone in Mudlet does it.

@jmckisson
Copy link
Contributor Author

It is sometimes necessary to quickly clear the input line in order to type a new command.

With Select the text you sent enabled, you can just type one command after another - you don't need to clear the input line. Is there an issue with this for you? This is how everyone in Mudlet does it.

That allows you to hit backspace to clear IF you haven't started typing something else yet.. But if youre midway through typing some other command and quickly need to switch targets as in my above example then we're forced to either do a key combination, hit some other bound key like F1/2, etc, or backspsace a bunch before entering a new command.

@vadi2
Copy link
Member

vadi2 commented Mar 10, 2024

I see.

I think this makes sense then unless we can see any side-effects:

adding functionality to the Down key to clear the input line if it is not in the state of traversing the command history stack. Additionally it would be useful for the Up key to immediately start traversing the command history regardless if there is typed input on the command line already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants