Open ToastedLion opened 6 months ago
"Hook competition" is the reason why PowerToys or other apps with a keyboard hook don't usually work well with EPKL. It is described in the README. Basically, both PowerToys and EPKL make V into a system hotkey, and there's no telling which app gets hold of it first.
Thanks, DreymaR! It makes sense to me that PowerToys and EPKL might compete for Ctrl + Shift + V. My questions are:
Thank you!
As far as I know, you'll have to decide between using PowerToys and EPKL. Even if you could get EPKL to resend certain key combinations to the input stream, there would be no way to get expected EPKL behavior from other keys when PowerToys gets hook priority. I think this gets too complex to contend with.
No, there is no "lower layer" in this context, as far as I know. Both programs use a low-level keyboard hook, and there is no priority queue for such hooks in Windows. A program that intercepts a key event can "pass it on" if so desired, but that is obviously not the default behavior for most programs. Certainly not for EPKL.
One possible way of cirumventing this problem might be if you can set the PowerToys hotkey to some key that EPKL does not hook, such as the F13-24 function keys. You could have EPKL produce one of these, and PowerToys should in theory intercept that. I cannot guarantee that it'd work, but it's possible.
One possible way of cirumventing this problem might be if you can set the PowerToys hotkey to some key that EPKL does not hook, such as the F13-24 function keys. You could have EPKL produce one of these, and PowerToys should in theory intercept that. I cannot guarantee that it'd work, but it's possible.
This is a great idea, thank you! I will try this out.
Failing that, I'll instead figure out how to map Ctrl + Shift + V directly in EPKL to an AutoHotKey script that manipulates the clipboard to paste as plain text. Given that EPKL is built on AutoHotKey, I'm guessing that this would be relatively straightforward.
Hi DreymaR!
Thank you for all of your work on this awesome tool.
I'm having trouble using PowerToys "Paste As Plain Text" the way I want to when EPKL is active. I use PowerToys "Paste As Plain Text" with Ctrl + Shift + V as the shortcut. With EPKL disabled, this works as expected across apps. With EPKL enabled and PowerToys "Paste As Plain Text" disabled, Ctrl + Shift + V works as expected in applications that natively implement that shortcut, and has no effect in applications that don't (i.e. expected behavior for this configuration). With EPKL enabled and PowerToys "Paste As Plain Text" enabled, Ctrl + Shift + V has inconsistent results: most often, it outputs "V", sometimes it pastes as plain text as expected, and occasionally it has no effect. All three of these happen with some frequency regardless of whether the active application natively implements this shortcut.
If I use an eD layout and comment out the line
QW_V = V 1 v V -- ÷ γ
inBaseLayout_Cmk-eD.ini
, then once again, PowerToys "Paste As Plain Text" works as expected. If I use a VK layout and comment out the lineQW_V = V VirtualKey
inBaseLayout_Cmk-VK.ini
, again, PowerToys "Paste As Plain Text" works as expected.Below is the output of the key history when I get "V'. It always looks approximately like this, and fills up the default 50 lines however quickly I try to press and release all the keys.
Below is the output of the key history when I get the expected "paste as plain text" behavior. In this case the default key history fully captures the key sequence.
And below is the key history when I get no effect. Again, it always fills up the default 50 lines.
Are you able to share any insight into what's going on here? Is there a way I can continue to use the V key for additional layers without preventing Ctrl + Shift + V from having the desired effect with PowerToys?
Thank you! TL