I used autohotkey to remap a key that wasnt functioning to another key. it works alright but at some certain areas. it doesn't work fully well with some games. tried a lot of modifications but still the same result. then again im a newbie in using autohotkey so any insights on what i could do to fix it.
Related
Both my Control keys are broken on my Keyboard. In the meantime while I get a replacement, I've been trying to remap it to different keys. I watched a few youtube videos and scoured the web and this is the code I came up with to remap Ctrl to my tilde key (~/`) using AutoHotKey.
LCtrl::`
I am very, very, very bad at coding so I was wondering if anyone could tell me what I did wrong on this script.
You switched them up.
If your control keys are broken, and you want tilde to act as your temporary left control, this should work:
`::LCtrl ; Remap tilde to LCtrl
I'm using AHK for a while and I love it! But today I noticed something weird.
I tend to use scripts to automate things like task switching, audio mute/unmute on applications, etc.
I started playing the game Call of Duty: Black Ops 4 and my hotkeys were acting weird. They did what they should, but with a few "extra" actions I didn't want. The problem was, that AHK couldn't block access to any keys which was bound to an action in the settings of the game.
Step by step I tried to fix this and narrow down what the specific problem could be. I tried things like:
F1::
Send, f
Return
F1::Return
VK70::Return
SC03B::Return
None of these worked. Yes, the first one wrote the character "f" when the chat was open, but all of them did the action what it should for the game.
And another example of this control of the game is the Caps Lock key, which can't be used in some situations, because it toggles the Map in-game. And to prevent confusion when using the chat, the developers disabled it when it can be used as a map toggle. Because of this, I can't bind any AHK hotkey to Caps Lock, because it won't fire when it is blocked by the game.
I'd like to ask if I could "catch" these keys earlier somehow, before it reaches the applications? How could I implement my script lower, than it is by default?
Thanks in advance!
My AutoHotInterception library uses a custom device driver and allows you to block below the OS layer. You want the "Subscription Mode" method, not the "Context mode" method.
I really enjoy using vs code but there are some many shortcuts to remember and every new plugins come with a new set.
Of course, I can use the command palette in order to quickly execute a command, but I would like something even more faster such as assigning a shortcut to any of the keys for a device like a Novation Launchpad midi controller.
Stackoverflow is maybe not the best plase to ask this question but I didn't knew where to post it, so is there anyone who tried something like this? I have seen this video (https://www.youtube.com/watch?v=LOyNUGS4RC8) linking such a device with visual studio so perhaps someone created a software dedicated for vs code already.
Regards,
Johnny -
I've setup this with MIDI Loupe and midiStroke.
MIDI Loupe listens your device and logs channel/key/value you just hit on your midi controller - with this tool you inspect your device's output.
Then in midiStroke you map controls to shortcuts.
Note: I've found my midiStroke setup for M-Audio Axiom 49 keys don't require values (only key number) but controls (e.g. record start) do require it. Also for me letter keys didn't not work if uppercased (e.g. for garageband recording start I need simply R button hit and R should be r in this case)
Detailed tutorial here
Basically I've used 2 keyboards for a very long time for the sake of personal convenience, but now there's something that's really bugging me. I'd like to remap the spacebar on my second keyboard to w/e so that I can play a particular game with two separate space bars.
Problems I've encountered so far is that keyboard remapping software tend to remap the keys for both keyboards. Or the remaping doesn't work in-game although it seems to work fine in notepad or such. Mostly likely since the remapping occurs on a higher level then where the game is fetching it's inputs.
Here's what did on HIDmacros;
For the trigger kbd6 32 ()
HIDMacros.SendKeys "p"
Not much but I'm not too savvy in this field haha
Does anyone know how I may achieve this?
-Edit: Oh and the ability to "hold" the key is a must, or else they'd be no point in doing this :/. I'm thinking hardware modifications at this point haha
I was able to use AutoHotKey AHKHID script and SharpKeys to accomplish something similar.
Using SharpKeys I remapped the key (in your case it's spacebar) to some fictitious key.
Then using AutoHotKey with AHKHID script, I was able to listen to strokes on that key, and determine from which device it was sent -
Then I would simulate the wanted key stroke.
I believe this could work in your situation (also, I simulate the up and down strokes, so "holding" works).
I've posted the full solution on the AutoHotKey's forum:
http://www.autohotkey.com/board/topic/38015-ahkhid-an-ahk-implementation-of-the-hid-functions/page-29#entry631055
Good luck
I keep typing "t eh" instead of " the" which is, of course, annoying in the amount of time it takes me to correct myself.
The obvious answer is "Learn to type, noob!" or at least to type more slowly and/or more correctly. This error is frighteningly consistent so it appears I've trained my muscle memory for that pattern already.
But I'm wondering if it's possible to write a small, windows portable script or application that, when it detects the incorrect sequence, backspaces and corrects it automatically at a layer where it would apply to any keyboard input.
Does C# have access to that layer of the OS that intercepts keypresses systemwide?
Will I run into UAC issues with Vista?
Am I re-inventing the wheel (ie, are there open source tools I can modify or use out of the box)?
In DOS this sort of thing was quite easy and one could make TSRs (Terminate and Stay Resident) programs that would, for instance, give you a calculator onscreen with a special keypress. Not to mention the many, many practical joke programs based on this concept (dial "M" for monster!)...
I would, of course, never suggest such a utility could be used that way for co-workers...
-Adam
On windows you could use AutoHotKey. That allows you to create little scripts or macros to automate and correct things like mistypes.
One use was posted on lifehacker which took the common mistyped words and corrected them. It is at http://lifehacker.com/192506/download-of-the-day-universal-autocorrect
UPDATE Per Comment: This is Free software and windows only as far as I know.
The above script is just an example of what it can do. There are a slew of scripts available at AutoHotkeys Site
I suggest AutoHotKey. If you've never used it before, have a quick read of the tutorial: http://www.autohotkey.com/docs/Tutorial.htm
The feature you are looking for is called "hotstrings." http://www.autohotkey.com/docs/Hotstrings.htm
In your case, your script would look something like:
::teh::the
That's it! Add other things you want corrected on additional lines. AutoHotkey scripts can be compiled so you don't have to install AutoHotKey on all of your machines.
It's a very cool program. It's primary use (for making custom hotkeys) rocks! These scripts are system wide so you'll also probably want to make a hotkey to be able to turn them off too!
EDIT: In a comment, it was mentioned that he actually types "t eh" (with a space in it) and I wondered if something additional would be needed for it to work. I just tested it and it works fine. Just install autohotkey, and create a file with the .AHK extension. In that file put in the following line
::t eh::the
and save the file. Then double-click on the AHK file to load AutoHotKey with your script (you'll see a green square in your system tray to let you know it is running). It should work fine!
Yes, you can use pinvoke commands from C# to intercept the low-level os commands. I recommend you take a look at http://www.pinvoke.net. The coding isn't easy but it does work.
I suggest learning to type more slowly. I also suffer from "teh" and "ahve" in part due to autocorrect giving me the leniency. If you forced yourself to retrain then you would not be at a disadvantage when using someone else's machine.
Not to mention the unfortunate event when you need to write "t eh" and are being prevented by an overzealous 'corrector'.