horeah / PyCmd

Improved interactive experience for Windows' cmd.exe
GNU Lesser General Public License v3.0
18 stars 4 forks source link

New feature Ctrl-Alt-K (remove commands from the history) prevents typing characters via "Alt Gr" #17

Closed ufo closed 3 months ago

ufo commented 3 months ago

Hi, I finally updated PyCmd after a long time to get the latest great improvements. I personally find using CTRL-ALT-K very useful, but I immediately found out that I couldn't type characters like "~" oder "|" any longer, since for that I have to press "Alt Gr" on a german keyboard layout. The current implementation doesn't pass through any other keys pressed with CTRL+ALT. I could make a merge request, since it's an easy one. Greets

horeah commented 3 months ago

I never guessed that typing certain characters on certain layouts might require Ctrl-Alt-... combos. Thank you for finding and fixing this!

horeah commented 3 months ago

@ufo did you consider the use of Ctrl-Alt-keys during the "incremental" history search (Ctrl-R)? Can you please check if everything works as expected?

ufo commented 3 months ago

@ufo did you consider the use of Ctrl-Alt-keys during the "incremental" history search (Ctrl-R)? Can you please check if everything works as expected?

Oh, you're right of course, I'll have a look at Window.py as well!

ufo commented 3 months ago

Was CTRL+ALT+K currently supposed to already work in a CTRL+R window? I thought I broke it, but it doesn't seem to work in the commit before I changed anything. I see that can_zap is True for this kind of window, but I couldn't figure out for now, how and if it should (already) remove an entry from a currently displayed list.

horeah commented 3 months ago

Was CTRL+ALT+K currently supposed to already work in a CTRL+R window? I thought I broke it, but it doesn't seem to work in the commit before I changed anything. I see that can_zap is True for this kind of window, but I couldn't figure out for now, how and if it should (already) remove an entry from a currently displayed list. Yes, Ctrl-Alt-K should work in a Ctrl-R window (and it does work for me) -- did it not work for you?!

ufo commented 3 months ago

Yes, Ctrl-Alt-K should work in a Ctrl-R window (and it does work for me) -- did it not work for you?!

Dooh.. I scratched my head until I used this tool, just to find out that some random program simply registered Ctrl-Alt-K as a global shortcut, but didn't do anything when pressing it: https://github.com/ITachiLab/hotkey-detective/ . So now that I know it's of course finally working in PyCmd.