Code52 / carnac

A utility to give some insight into how you use your keyboard
http://carnackeys.com/
Microsoft Public License
4.2k stars 506 forks source link

RegEx filter understands sub-processes of cmd.exe and powershell.exe (such as running vim from the console) #321

Closed kasajian closed 1 month ago

kasajian commented 2 years ago

The PR adds support for filtering on sub-processes. For instance, when 'vim' is launched from cmd.exe or powershell.exe, the keyboard focus is processed by the shell (cmd.exe) rathern than vim.exe, so filtering doesn't work.

The "fix" is to treat shells named "cmd" and "powershell" in a special. That is, when one of these process receive the keyboard focus, their child-processes are also validated.

The code determines what is a shell using the RegEx "cmd|powershell", which can be modified in the C:\ProgramData\Carnac\PopupSettings.settings, although there's no UI for it.

This PR includes this PR: https://github.com/DNIStream/carnac/commit/47e3333d7708e6620c66564b3ec81fbd0e2503c0

https://github.com/Code52/carnac/issues/232