Forum > Options

Weird Behaviour in Keymapping for uncommenting a block

(1/1)

Zvoni:
Hi Folks,

Ubuntu18.10-64Bit/FPC304/Laz200 with QT5

The standard shortcut for uncommenting a selected block of comments (CTRL+SHIFT+U) shows strange behaviour.

I select a block of consecutive comments (comments with "//"), i press CTRL+SHIFT+U, nothing happens, i move the mouse to the menu, and the moment i click on the "Source-Code"-Menu my selected block of comments is deleted (!!) and a lowercase "u" is inserted instead.

I checked the Keymappings in Tools - Options: there are no conflicts
I even deleted the shortcut for that from the mappings (correctly shown in the menu that there is no shortcut), saved everything, closed Lazarus, started again,
defined the shortcut again (via Key-Trap): no change.

Bug or feature?  :D :D :D

EDIT: Huh?????
Just for grins i changed the shortcut to CTRL+SHIFT+A (no conflicts), and it works as intended - uncomments a block
changed it back to CTRL+SHIFT+U, and i'm back at square one.
There is some black voodoo going on.... Lazarus doesn't seem to like my "u"-key..... :'( :'( :'( :'(

Blaazen:
OK, Ctrl+Shift+U has no conflict in Lazarus, but isn't there any conflict in your system or desktop environment?

Example: Ctrl+F4 doesn't work for me, because it switches to the fourth virtual desktop.

Zvoni:

--- Quote from: Blaazen on March 10, 2019, 06:28:57 pm ---OK, Ctrl+Shift+U has no conflict in Lazarus, but isn't there any conflict in your system or desktop environment?

Example: Ctrl+F4 doesn't work for me, because it switches to the fourth virtual desktop.

--- End quote ---
Good idea.
Not that i can see a reaction (just closed everything and pressed CTRL+SHIFT+U --> nothing happend).
The reason why it's weird for me is, that with the GTK2-Interface of Lazarus it was working normally (yes, i haven't compiled Lazarus back to GTK2 just to test it).
I've switched to CTRL+SHIFT+A and it's doing what it's supposed to do

EDIT: Another reason, why i don't think having a systemwide conflict with that shortcut is, because the Key-trapping in Tools-Options works.
I activate Key-trap (on everything unchecked/unknown), press CTRL+SHIFT+U, and the combination appears correctly in the dialogue

Martin_fr:
Compile the IDE with VerboseKeys
then run it from a terminal, and watch the output.

You should see when and which key it receives. (at least for the editor)


Zvoni:

--- Quote from: Martin_fr on March 10, 2019, 10:36:45 pm ---Compile the IDE with VerboseKeys
then run it from a terminal, and watch the output.

You should see when and which key it receives. (at least for the editor)

--- End quote ---

Recompiled IDE with VerboseKeys and used "startlazarus" from terminal.
Result for CTRL+SHIFT+U
I see the KeyDown for CTRL --> 17
I see the keyDown for SHIFT --> 16
Now it gets weird: I see a KeyUp (!!) for "U" --> fires a UTF8Pressed (or something. My Linux-Laptop is at home right now)

Result for CTRL+SHIFT+A
I see the KeyDown for CTRL --> 17
I see the keyDown for SHIFT --> 16
I see the KeyDown for "A" --> everything OK

EDIT: Before someone complains, that my "u"-key might be broken:
a regular "u"-press results in all correct ways (KeyDown, KeyUp, Fire UTF8Something, write in Editor)

Navigation

[0] Message Index

Go to full version