PDA

View Full Version : [HotKeyNet] Using Shift as a hotkey on it's own?



gamerboy123p
04-10-2020, 03:20 AM
I'm writing up a script for a personal project, and am needing to translate all of my key presses to other things. So for example, when I press the letter "T" on my keyboard, the letter "T" is sent to my active program, but the "W" key is pressed on a separate program, as well as the "1" key if it wasn't already pressed. I have to do this for every key on the keyboard, translating them into a sort of made of value system.
It was going great, until I hit the shift, alt and ctrl keys. Apparently, you can't make a hotkey for when only a modifier key is pressed? Does anyone know a workaround? I've searched the whole site and tried anything from keylists to reassigning the virtual key. I use the shift key a lot in gaming for my inventory, I'm surprised I can't find anyone else with this problem.

Alternatively, a way to write a code for any key that's pressed that I haven't already assigned would work too, so long as the shift press would still go through to the main application.

This is what I'm currently trying to do, but hotkeynet simply says that a modifier can't be the only hotkey.

<HotKey LShift>
<passthrough>

<SendLabel writer>

<SetVar Shiftpress true>
<DoHotkey Hotkey LCtrl LAlt F1>

<If Sect6 is false>


<Key 6>
<Sect6true>


<EndIf>

<SetVar hotEpress true>
<KeyDown E>


<HotKeyUp LShift>
<passthrough>
<SendLabel writer>


<SetVar Shiftpress false>
<SetVar hotEpress false>
<KeyUp E>
<DoHotkey Hotkey LShift LAlt F1>

gamerboy123p
04-11-2020, 12:53 AM
For anyone else running into this problem, there is a fix but it's unfortunately outside of HKN. After much searching I found that there's no way to trick HKN to use shift as a hotkey on it's own, so I downloaded a keybinder program (there's millions of free ones, I'm still looking for the one I like most) so when I press shift, ctrl or alt, it's actually pressing Shift F1. That way in HKN, I can write a hotkey for <Shift F1> that'll intercept the input, and I can tell it to only push out the shift press to my game and another key to a different program, etc.
Hope that helps someone else! I'm a little shocked that this wasn't an option in HKN, but it looks like the creator was working on it before he cancelled the project.