Recent

Author Topic: IDE: Keys which do not work in the Default key mapping on Qt6.  (Read 1781 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1154
I recently started using Lazarus on a Linux platform with KDE Plasma 6.

  • Lazarus 3.99 (rev main_3_99-2093-g82cc65e98b)
  • FPC 3.2.2
  • x86_64-linux-qt6
  • AnchorDocking and DockedFormEditor installed

  • Operating System: openSUSE Tumbleweed 20240607
  • KDE Plasma Version: 6.0.5
  • KDE Frameworks Version: 6.2.0
  • Qt Version: 6.7.1
  • Graphics Platform: X11

I found that the following keys, mapped as the "KeyA" settings in the default key mapping, do not do anything:

  • Ctrl + / = Toggle Comment
  • Alt + D = Cut current line
  • Ctrl + E = Find Incremental (TBH I don't know what this is supposed to do...)
  • Ctrl + Shift + M = Insert from Character Map
  • Ctrl + Shift + <#> = Toggle marker number # (Ctrl + K + <#> works though)

Are these known issues on Linux? Or the Qt6 widgetset? Or, it is worthy of a bug report?

Feedback appreciated.
« Last Edit: June 08, 2024, 06:13:06 pm by dsiders »
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

zeljko

  • Hero Member
  • *****
  • Posts: 1616
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #1 on: June 08, 2024, 09:50:18 pm »
Please fill issue with example project.

TRon

  • Hero Member
  • *****
  • Posts: 2807
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #2 on: June 08, 2024, 10:17:28 pm »
Would it not be more productive to extend issue 40952 ? (I honestly do not know what is the best route there)

MarkMLl

  • Hero Member
  • *****
  • Posts: 6949
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #3 on: June 09, 2024, 12:16:47 am »
I'm uncomfortable here, but I'd suggest that this is something we have to live with and that it's largely a documentation issue.

I'm an habitual KDE user, but for the last few years have used a gamer's keypad to beat the IDE into panting submission.

There are, quite simply, some key combinations ** which don't work since they've been preempted at a lower level, and about the best that we can do is point users at (a) a way of determining that the window manager (etc.) has claimed them and (b) a way to tell the IDE to use something different.

MarkMLl

** As one of the older members of the community, I have strong views on this. Due to inevitable wear and tear, I find the physical (and mental) contortions needed to invoke IDE shortcuts to be between uncomfortable and impossible.

I have seen things... I have seen a word processor keyboard designed by a woman for lady typists which had so many key combinations that it put Emacs to shame https://ichef.bbci.co.uk/news/976/cpsprodpb/17C23/production/_104751379_9c0bd761-972a-4627-b74e-fb42307e4466.jpg.webp

If a potential operation can't be presented as a selection on a top-of window/screen or dropdown menu, together with a succinct explanation of what it will do, then something (probably the IDE developer) is badly broken.

I am not denying that keyboard shortcuts can be useful. But when a user is switching between substantially different application areas- text processing to 2D drafting to 3D design- there are so many conceptual possibilities that trying to remember key combinations for them becomes infeasible.

Larry Tesler's rallying cry was "Don't mode me in", but quite frankly history has proven him wrong. If one is working in a word processor or a 2D drawing program, should 3D operations be presented as a distraction?

I'm not known for praising MS, but they built the Windows '95 ("Chicago") user interface on top of CUA, and broadly speaking they got it right. At any given time there's probably a half-dozen keyboard shortcuts that the average user can keep in his memory, and if he can't retain those then they (and other significant operations) should be readily accessible via menus.
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

dsiders

  • Hero Member
  • *****
  • Posts: 1154
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #4 on: June 09, 2024, 12:36:39 am »
Please fill issue with example project.

I should have been more specific. The context for the errors (omissions) is the Lazarus IDE.

I can write an app to catch those keystrokes though. I'll file a bug report when I complete the demo.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dsiders

  • Hero Member
  • *****
  • Posts: 1154
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #5 on: June 09, 2024, 07:16:26 am »
Please fill issue with example project.

I should have been more specific. The context for the errors (omissions) is the Lazarus IDE.

I can write an app to catch those keystrokes though. I'll file a bug report when I complete the demo.

In the process of writing my demo, I discovered that a couple  of the keys work if you know what they really do.

I confirmed that the others really do not work. I'm going to update the original bug report for Ctrl+F4 with the new keys and additional information that I've stumbled over.

Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dsiders

  • Hero Member
  • *****
  • Posts: 1154
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #6 on: June 10, 2024, 07:21:22 pm »
Just to follow up...

The original issue (Ctrl+F4) is caused by global KDE shortcuts to select a virtual desktop . I remapped mine to  Meta+F1..Meta+F4. Works as expected now.

Ctrl+/ does not work because QT and LCL do not agree on the virtual key code for the Slash key. QT (all versions) is treating both VK_SLASH and VK_DIVIDE as the same key (VK_DIVIDE). LCL says they should be VK_OEM_2 or VK_LCL_SLASH  (Slash) (?!?) and VK_DIVIDE (NumPad Divide) respectively.

Ctrl+Shift+M is a conflict between ecInsertCharacter and ecPluginMultiCaretModeMoveAll key mappings - as far as I can tell.

« Last Edit: June 10, 2024, 07:37:18 pm by dsiders »
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Thaddy

  • Hero Member
  • *****
  • Posts: 14868
  • Censorship about opinions does not belong here.
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #7 on: June 10, 2024, 09:37:22 pm »
That key-taken issue is a long recurring issue for terminals and there is no real good solution.
Remember the Medway disaster..

dsiders

  • Hero Member
  • *****
  • Posts: 1154
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #8 on: June 10, 2024, 10:33:57 pm »
That key-taken issue is a long recurring issue for terminals and there is no real good solution.

I'm pretty new to Linux, so I had no idea. Lesson learned.
Now I wonder if need to check other global shortcuts...
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Thaddy

  • Hero Member
  • *****
  • Posts: 14868
  • Censorship about opinions does not belong here.
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #9 on: June 11, 2024, 06:53:10 am »
Good starting points are:
https://itsfoss.com/linux-terminal-shortcuts/
and
https://www.wordstar.org/index.php/wsdos-documentation/wsdos-commands/108-wordstar-3-for-dos-commands-reference

You will find that many keyboard shortcuts in all kind of environments are based on the wordstar (1978 cp/m) set of shortcuts. That includes the fpc textmode IDE and Lazarus, but also terminals and environments like Qt and GTK.
The textmode IDE (fp) strungles often with shortcuts in the terminal.
Lazarus GUI programs less so, since it does not need a terminal.
But even for GUI pograms there are exceptions.
(Some, not all) Terminal commands need to have precedence over the commands of programs running in it, because otherwise the terminal may not work as expected.

The problem is that everybody and everything will want to use the wordstar set or a subset of it, because of the familiarity with it for most users.
See why it is so hard to get it right?

Btw on Windows you can have the same issue if there are a lot of global keyboard shortcuts registered beyond the system reserved ones.
I must say I do not know (yet) how to do that on Linux, but for windows I have example code.
« Last Edit: June 11, 2024, 07:02:24 am by Thaddy »
Remember the Medway disaster..

MarkMLl

  • Hero Member
  • *****
  • Posts: 6949
Re: IDE: Keys which do not work in the Default key mapping on Qt6.
« Reply #10 on: June 11, 2024, 08:29:59 am »
The problem is that everybody and everything will want to use the wordstar set or a subset of it, because of the familiarity with it for most users.
See why it is so hard to get it right?

The problem is that once a key's missing it can be extremely difficult to work out what's swallowing it.

My experience is that modifier keys also work different on e.g. Qt and GTK, that right- and left-hand modifiers work different, and so on. I went through it in some detail when writing a wrapper for APL, and also when selecting a key-combination to put a program into "maven mode".

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018