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

Can ctrl-backspace be supported in textfields like 'Search notes' and 'Find in text'? #1278

Closed
sanderboom opened this issue Sep 4, 2019 · 10 comments

Comments

@sanderboom
Copy link
Contributor

commented Sep 4, 2019

Expected behaviour

Pressing ctrl-backspace (on Linux this is) the previous word should be removed. This behavior does work in e.g. the 'Find setting' and 'Find action' textfields.

Actual behaviour

Nothing happens.

Steps to reproduce

  • Type some words in 'Search notes' or 'Find in text' (possibly other textfieldfs as well)
  • Press ctrl-backspace
  • See that nothing happens

Output from the debug section in the settings dialog

Version: 19.9.0
Build date: Sep 3 2019
Build number: 570
Platform: linux
Operating System: Manjaro Linux
Build architecture: x86_64
Current architecture: x86_64
Release: AUR
Qt Version (build): 5.13.0
Qt Version (runtime): 5.13.0
Portable mode: no
Application arguments: /usr/bin/QOwnNotes
Qt Debug: 0
Locale (system): en_US
Locale (interface): empty
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 866
Calendar items: 2
Enabled scripts: 7

Relevant log output in the Log panel

@pbek pbek added the enhancement label Sep 4, 2019

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 4, 2019

Thank you for your suggestion.

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

For some reason I cannot capture the left control key in line edits, but I can capture the shift key so I will use that. Btw. the right control key works out of the box.

@pbek pbek added this to the 19.9.3 milestone Sep 5, 2019

@sanderboom

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

That's weird. This shortcut is coming from the OS (KDE Sytem Settings > Workspace > Shortcuts > Standard Shortcuts):

image

It works everywhere I interact with text. Instead of trying to capture it, maybe search for something that is blocking default behavior?

Also:

This behavior does work in e.g. the 'Find setting' and 'Find action' textfields.

What is different regarding these fields?

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

That's strange, so far I haven't found anything that could do that.

@sanderboom

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

Maybe your shortcut setting is different? ctrl+backspace and ctrl+delete are pretty universal (at least in my experience).

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

I finally found the culprit. There is are main menu items for deleting the current word and the current line with the shortcut Ctrl + Backspace and Alt + Backspace. There already was a workaround in place so other widgets will get a special event with the shortcut passed through. That event is for some reason ignored by the QLineEdit so I now implemented special workarounds for the two incidents.

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

19.9.3

  • you now can press Ctrl + Backspace to remove the current word
    and Alt + Backspace to remove the whole text in line edits
    like the note text search
pbek added a commit that referenced this issue Sep 5, 2019
@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

There now is a new release, could you please test it and report if it works for you?

@sanderboom

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

Thanks for the quick fix!

@sanderboom sanderboom closed this Sep 5, 2019

@pbek

This comment has been minimized.

Copy link
Owner

commented Sep 5, 2019

Great, thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.