Fixed deletion of files by Del button on Numeric Keypad
ClosedPublic

Authored by nmel on Mar 15 2018, 6:46 AM.

Details

Summary

Regression is introduced by commit 3725037.

Test Plan

Press various combinations of modifiers and Delete, Del buttons. Only plain Delete and Del should trigger delete
operation.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nmel requested review of this revision.Mar 15 2018, 6:46 AM
nmel created this revision.

The tests I described work fine for me except for one case: Shift + Del. It changes current item. If there are files starting with dot ".", it will go to the next file, otherwise it will go to "..". I haven't figured why yet. Looks like a search but my breakpoints for search don't trigger. Any ideas are appreciated.

Additional info:
If NumLock is on, Shift + Del generates QKeyEvent(KeyPress, Key_Delete, ShiftModifier|KeypadModifier)
If NumLock is off, Shift + Del generates QKeyEvent(KeyPress, Key_Period, ShiftModifier|KeypadModifier, text=".")
I expected the opposite! o_O
It's another mystery.

nmel added a comment.Mar 21 2018, 5:42 AM

Kindly ping.

martinkostolny accepted this revision.Mar 21 2018, 10:01 PM
martinkostolny added a subscriber: martinkostolny.

Thanks Nikita for looking into this! I was unable to test it until now since I don't usually have access to a PC with standard keyboard with numeric keypad. It works nicely.

I cannot reproduce the shift+del bug. When numlock is off, I can use Del on numeric keypad as it was a standard Delete button along with shift modifier to delete files. I actually don't get this behaviour because by default on linux / xorg on numeric keypad e.g. "7" with num-lock off means "home" and shift+"7" means 7. Therefore "Del" with num-lock off should mean delete (this works) but shift+Del should mean "." like you wrote in your "additional info" section.

Question is how this works on wayland. I use wayland only on my laptop without numeric keypad so I'll test it later. The other PC has nvidia so wayland is off limits for now :).

This revision is now accepted and ready to land.Mar 21 2018, 10:01 PM
This revision was automatically updated to reflect the committed changes.
nmel added a comment.Mar 22 2018, 7:11 AM

Thanks for your review, Martin.

Shift + NumLock seems to be a known problem: https://blogs.msdn.microsoft.com/oldnewthing/20040906-00/?p=37953/

Strange that you can't repro that current item selection is being reset to '..' — it doesn't feel liek something specific to my setup. To other devs: if you can repro, please let me know.