StrokesPlus.net Forum
»
Bugs or Issues
»
Bug Reports
»
Numpad Hotkey definition not working with SHIFT
Rank: Advanced Member
Groups: Approved
Joined: 10/26/2020(UTC) Posts: 50 Location: Darmstadt Thanks: 15 times Was thanked: 2 time(s) in 2 post(s)
|
At least up to current version 0.3.9.9, I cannot specify several Hotkey combinations when Numpad keys are involved:
(Having NumLock switched on) all Numpad keys pressed alone or together with Ctrl are recognized correctly. Combinations with Shift instead are not working for the 10 number keys and the DECIMAL key: Pressing Shift first is displayed correctly but as soon as I press one the mentioned keys their NumLock-off key is displayed while erasing Shift. Therefore, it is not possible to specify Shift-Decimal as a hotkey (or one of the other number keys with Shift).
What makes it even worse is, I can define i.e. Ctrl-DECIMAL (or Ctrl-Numpad1) but it is not executed.
No other Keyboard related software is running and I tried using a german and an english keyboard layout.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 10/26/2020(UTC) Posts: 50 Location: Darmstadt Thanks: 15 times Was thanked: 2 time(s) in 2 post(s)
|
I feared you´d say something like that... And I would have believed, if I would not have used this for years now in my beloved tool ac'tivaid (https://activaid.telgkamp.de/) which is based on AutoHotkey scripting language. Within this tool, it is possible to define hotkeys just be pressing them (just like in S+) and there, Shift-NumpadDot is recognized. Unfortunately, I have no idea why, as the source code is quite complex and the language syntax is crap.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
Yeah, I would have to monitor the keystrokes individually and account for those specific cases - which might not be terribly hard to do, so I'll tinker with it when I feel a burst of energy :)
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,359 Location: Tampa, FL Thanks: 28 times Was thanked: 419 time(s) in 356 post(s)
|
However....you could use the keyboard hook event to handle this. The example below would detect Shift+NUMPAD0 - though it's actually no different than Shift+Insert (on my US keyboard, that is). Just have to have a timer to allow some time before setting the Shift key to released, since that happens instantly upon pressing Shift+NUMPAD0. Code:if(__spEngineWrapper.Engine.Name == sp.EngineList().Last().Engine.Name)
{
var keyboardEventObj = sp.GetStoredObject("keyboardEvent");
if(!keyboardEventObj.GetType().FullName.includes('EventConnection'))
{
//Bind to the asynchronous event (non-blocking)
var keyboardEvent = KeyboardHook.OnKeyboardHookEventAsync.connect(
function (sender, keyboardHookEvent) {
try
{
//If the Left or Right Shift key is pressed/released
if(keyboardHookEvent.Key == vk.LSHIFT || keyboardHookEvent.Key == vk.RSHIFT)
{
//Shift key is down
if(keyboardHookEvent.KeyState == KeyState.Down)
{
sp.StoreBool("ShiftDown", true);
}
else
{
sp.CreateTimer("ShiftWatch", 100, 100, `sp.StoreBool("ShiftDown", false);sp.DeleteTimer("ShiftWatch");`);
}
}
if(keyboardHookEvent.Key == vk.INSERT && keyboardHookEvent.KeyState == KeyState.Down && sp.GetStoredBool("ShiftDown"))
{
sp.MessageBox("Shift+NUMPAD0 (Shift+Insert)", "Key");
}
}
catch {}
});
sp.StoreObject("keyboardEvent", keyboardEvent);
}
}
|
1 user thanked Rob for this useful post.
|
|
|
StrokesPlus.net Forum
»
Bugs or Issues
»
Bug Reports
»
Numpad Hotkey definition not working with SHIFT
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close