How can I make the mic mute key work in MS Teams with Autohotkey? - autohotkey

Since for some reason the microphone mute key does not work in MS Teams, I wanted to solve this issue with the following assignment. I found out that the mute key is actually F14 using event.keyCode tester However, it does not work, and I don't know why.
F14::Send {Ctrl Shift M}
When I track the mic mute key with AutoHotkey, it says the following after pressing it (it generates 3 entries for this one special key):

Use the mute key to toggle mute:
Volume_Mute::SendInput ^+m
References:
Keyboard shortcuts for Microsoft Teams
Multimedia Keys
Send variants

#!F14::Send ^+m
I used the AutoHotkey key history to find out, that not only F14 was pressed by this key, but also the (left) Windows and Alt key, so the statement above finally works, hurray! :)
Thanks also to Wenfang Du, he pointed me in the right direction.

Related

Auto Hot key for toggling stealth in Middle Earth Shadow of Mordor

Currently there is no toggle stealth in middle earth shadow of Mordor. So I tried to use auto hot key for toggling. My little finger hurts a lot when i keep holding. So I found this auto hot key script from here. https://steamcommunity.com/app/241930/discussions/0/617319460876561937/?l=italian#c490125103631105925
But this code does not seem to be working. I have autohotkey installed and also verified that it runs the sample msg box saying escape on pressing escape key program. I also remapped stealth to LCtrl. This is the 1st time I am using autohotkey. I have placed this file (shadow_of_mordor_stealth.ahk) in the same folder as the game's exe file is in. Thanks.
Update : As pointed by Sir Teddy The First, running in admin mode now works. Thankyou all for your help.

How to make AutoHotkey script for selecting a pen in OneNote(UWP)?

To give you an intro, I am not a programmer but a biologist who is learning a bit of programming.
Now I use OneNote a lot and continuously switch between typing and touch-based inking.
Now OneNote UWP does not have a shortcut for selecting a pen.
But I found out that by pressing Alt+d and then down and then continuously pressing right six times and then pressing enter, one can switch to pen via keyboard.
Now I want to automate the above process and link it to Numpad 1.
So I tried AutoHotkey and tried to learn making a script of the above command but still no success.
This is what I tried (3-4 different ways):
Numpad1::
!d
Down
Right
Right
Right
Right
Right
Right
Right
Enter
I know this script is wrong but I can't find the correct way to do it.
You're off to a good start! In order to send the keystrokes, you'll need to use one of the variations of the Send command. In addition, we can also make it so that it only work when OneNote is the active window using the #If directive. (It makes hotkeys context-sensitive.)
I don't have OneNote on my machine, but please verify that the title contains "OneNote" for the following script to work.
SetTitleMatchMode , 2
#If WinActive("OneNote")
Numpad1::Send , !d{down}{right 6}{enter}
#If
Edit: I installed OneNote to try it out. It appears to run too quickly. I added a key delay of 75ms and changed Send to SendEvent, which obeys the key delay. This worked fine for me:
SetTitleMatchMode , 2
SetKeyDelay , 75
#If WinActive("OneNote")
Numpad1::SendEvent , !d{down}{right 6}{enter}
#If

Macro Keys not Detected AutoHotkey

I have just purchased the Steelseries apex gaming keyboard and rival mouse. Unfortunately, each of these products has different software for macros and keyboard lighting, both of which are mediocre at most.
Instead of having 2 processes running in the background and having to use 2 crappy programs to write my macros, I have decided to use AutoHotkey for my macros, some of which I plan on making quite complex. The mouse was no problem in AutoHotkeys, with the two side buttons using XButton1 and XButton2, however no matter what I do, I can't detect my keyboard macro keys (M1 to M12 and MX1 to MX10).
Using a keyboard hook doesn't detect any keys, and looking online I can't find how to reference these keys either. I'm not even sure windows sees them, as when I try to input them into the shortcut key field in a normal shortcut they do nothing. So my questions are:
What is the name for the macro keys on my keyboard in AutoHotkey?
Is there any way to work around this problem without having to use the Steelseries Engine?
If I can't access them normally, is there a way to reassign them without external software?
(Optional) Is there any way to adjust the lighting on the keyboard and mouse without the Steelseries software as well?
Btw I'm using Windows 8 and here are the links to the mouse and keyboard. Thank you in advance.
You can get the name for special keys that are not listed in AutoHotkey documentation by following steps here.
Some notes and explanations:
You can use that script for step 1:
#InstallKeybdHook
Sleep, 99999999999999999999
When you run it, check if keyboard hook is active by:
press here:
then here:
and if active, you should see something like here:
In the step 6 the hex value column is here:
If that is not working for you, try Alternate solutions in the link that I provided before.

Simple macro help wanted

I just started using AutoHotKey yesterday and I am having trouble finding some info. I did search the program's help file, their website and this site and can't seem to locate what i would like to find.
I want to write a simple script that AutoHotkey will recognize.
When I press the 'q' key on the keyboard, I would like AutoHotKey to do the following:
Tab key press/release -> mouse right click -> Tab key press/release
If anyone with knowledge of AutoHotKey workings can help a befuddled n00b out, I'd appreciate it immensely.
As written above tutorials are your friend. You must realize that the letter q will not be usable for writing anymore, unless you define e.g. Ctrl+q or define this script to ONLY be active when a particular application is active.
In general your script would look like this:
q:: ; or ^q:: for Ctrl+q or !q:: for Alt+q or #q:: for Win+q or any combination like ^!#q:: for Ctrl+Alt+Win+q
SendInput, {Tab}
Click, Right
SendInput, {Tab}
Return

Assign F5 for browser refresh using autohotkey

I want to create a autohotkey script which performs browser refresh for F5. My PC has a media key assignment for F5 , so for browser refresh I have to press Fn+F5. What I want is for it to perform the refresh just on pressing F5.
You can try:
f5::Send, {Browser_Refresh}
or
f5::Send, ^r
This sounds like a similar problem I once had with an HP laptop. HP had decided to put their control keys (wifi, sound, screen brightness, etc) on the standard function keys. If you wanted to use any "normal" function key you also had to press the Fn key.
I don't know your brand (HP, Dell, etc), so best to Google for: "your brand" disable Fn and function key. You will most likely need to change this in your bios.
Hope this helps.
Alternatively, you could select any other combination like [Alt]-R and link it to send, {F5}.
You can toggle this behavior either in the BIOS or the Windows Mobility Center (Win+X) depending on your laptop brand.
By toggle, I mean, you will have to use Fn+F5 to use corresponding media feature.
You can use #Honest Abe's answer as well.