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

Ctrl + Backspace in Textboxes: delete whole word, not add rectangle #144

Open
penCsharpener opened this issue Feb 18, 2018 · 19 comments

Comments

@penCsharpener
Copy link

commented Feb 18, 2018

Steps to reproduce this issue

  1. type two search terms in database or table filter
  2. separate them with some regex (I often use pipe)
  3. remove the filter with Ctrl + backspace to delete entire word

Current behavior

at present Ctrl + backspace will write a rectangle

Expected behavior

the entire word in front of the cursor is removed
this works well in the query editor or quick filters (multi line text boxes)

Other areas

this could be applied in most textboxes but won't be as relevant. See table tabs in Basic, Options, Indexes and Foreign keys. I suppose it's the same issue as in Win Forms; all Textboxes show this behaviour. If it only deleted one letter but adding a box is just weird.

Possible solution

  • I know this from WinForms where I have to check the keys typed and then remove the last word manually up and including the next non-letter and non-digit character from the end
  • see answer by Patrick McDonald to get some idea how this could be fixed manually

Environment

  • HeidiSQL version:
    9.5.0.5253
  • Operating system:
    Win 10 1709
@penCsharpener

This comment has been minimized.

Copy link
Author

commented Feb 7, 2019

yes, I'm always using the latest nightly and it's still there. It's not in the Query tab textbox but all the text fields like search.
2019-02-07_15-05-30 heidisql

@okneloper

This comment has been minimized.

Copy link

commented May 14, 2019

Still an issue in 5565. It would be a nice little enhancement!

@decadence

This comment has been minimized.

Copy link

commented Sep 25, 2019

Same for me.
And I want to add that Ctrl+Delete doesn't work in Query tab (but works in other inputs). It should delete word from the right side of a cursor.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

And I want to add that Ctrl+Delete doesn't work in Query tab (but works in other inputs)

How can it be you're experiencing the exact opposite than the other reporters here? Maybe on Wine?

@decadence

This comment has been minimized.

Copy link

commented Sep 25, 2019

No, I'm on Windows 10.
Seems like you misread my message. I told about Ctrl+Delete on Query tab. Ctrl+Backspace issue is still there for me.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

Yes, I misread that. Indeed, I can confirm that Ctrl+Backspace does not work in single line edit-boxes, and Ctr+Delete does not work in SQL areas.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

Though SynEdit supports that "delete next word" - by default it has Ctrl+Shift+Delete Ctrl+T. You can change that in Tools > Preferences > Shortcuts > SQL editing:
grafik

@decadence

This comment has been minimized.

Copy link

commented Sep 25, 2019

Thanks.
But it's strange default shortcut because all text editors use Ctrl+Delete.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

According to the relevant line in SynEdit this is by default Ctrl+T, which is overridden by HeidiSQL for "new tab". I'm scratching my head where this Ctrl+Shift+Delete comes from.

@decadence

This comment has been minimized.

Copy link

commented Sep 25, 2019

Is there any chance to make Ctrl+Delete default for consistency with other editors?

ansgarbecker added a commit that referenced this issue Sep 25, 2019
ansgarbecker added a commit that referenced this issue Sep 25, 2019
…re it works for more instances of TEdit, e.g. the database and table filter. Also, let the object editors call this code, as they don't derive from TExtForm.
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

Yes, I can try to initialize it by default to that.

@decadence

This comment has been minimized.

Copy link

commented Sep 25, 2019

Thanks 👏

@ansgarbecker ansgarbecker added this to the v10.3 milestone Sep 25, 2019
ansgarbecker added a commit that referenced this issue Sep 25, 2019
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 25, 2019

I just pushed a few changes, which should enable Ctrl+Backspace on most (if not all) edit boxes in HeidiSQL. This implements a workaround I found here, though it works very good for me here. For those who want to check, please wait half an hour and download the next build.

@penCsharpener

This comment has been minimized.

Copy link
Author

commented Sep 25, 2019

yes, it works. Thanks so much.

ansgarbecker added a commit that referenced this issue Sep 26, 2019
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 26, 2019

New default shortcut for "delete next word" in the next build is changed from Ctrl+T to Ctrl+Del.

No complaints so far, so I'll close this issue. Please shout if I am missing something.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 27, 2019

Shit: The popup text editor now does not accept the Enter key - instead it selects the text.

@ansgarbecker ansgarbecker reopened this Sep 27, 2019
ansgarbecker added a commit that referenced this issue Sep 28, 2019
…when they were manipulated by SHAutoComplete, so fix that by leaving TCustomMemo as they are
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Sep 28, 2019

Next build leaves that hack away for multi-line memos, for which the Enter key was broken. I have no clue how to fix that Ctrl+Backspace for these.

@decadence

This comment has been minimized.

Copy link

commented Oct 3, 2019

@ansgarbecker I found another strange default hot key: why default key for Undo is Alt+Backspace and not Ctrl+Z as in all programs in the world? :)
In Query tab Ctrl+Z cancels only few steps. Alt+Backspace works normal.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 8, 2019

Unfortunately, I had to revert my previous solution for supporting Ctrl+Backspace. This introduced too many new bugs. I will have to find a better one.
Here's another approach: simulating the selection and removal of the word left to the cursor in an OnKeyPress event. (or maybe better using some Windows message event)

@ansgarbecker ansgarbecker reopened this Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.