How do Bind a key or mouse click to the fn key (autohotkey) - autohotkey

So I am working with an old windows vista and to decrease the volume you need to press fn + the up or down arrow key. I'm stuck trying to figure out how to find the key for the fn key but some of the methods I try don't work. I want to bind it to the mouse scroll, the normal soundset doesn't work for some reason the computer is an acser extenssa 5220. Anymore questions I will answer down bellow. I'm thinking about downloading a program to remap the keys on the vista, but then I still don't if that and autohotkey will work.

You don't send the FN key because Windows doesn't actually even know of such a key. The FN key is processed by your keyboard. So what's sent to Windows is actually just the multimedia key, in your case volume up/down.
In AHK you can send the keys like this: SendInput, {Volume_Up}.
Alternatively you could use SoundSet.

Related

AutoHotkey Remapping Keys

I'm trying to remap a couple of keys using a program called AutoHotkey. I don't really have any coding experience but I took a shot at it and ended up unsurprisingly sucking at it haha. Was wondering if anybody could help with my issue
I wanted to remap my left ctrl and l key to send the tilde key (` key next to the 1), and my left ctrl and left shift button to the esc key. I'm trying to use these remapped keybindings in some games, and I've heard that there's some problems using AHK with video games in general. Tried to remedy this problem using the commands AHK help recommended, like SendPlay, or SendMode, Play.
So far this is the code I've written that's ended trying to solve this:
#SingleInstance force
^l::SendMode, Play {`}
{LShift}{LCtrl}::SendMode, Play {Esc}
Would appreciate any help with this...thanks!
<^l::SendPlay ``
LShift & LControl::SendPlay {Escape}
You shouldn't use a hotkey made of two modifier keys though.

AHK keystroke bind to keystroke

I want alt+s to trigger win+s (search functionality in windows 10). So I have
!s::#s
But the keystrokes don't map to eachother. Why is this?
To do what you ask, you should use:
!s::send #s
Your configuration does actually work, but the hook combination detected by Windows will be that of !#s since the alt modifier remains pressed, which will not initiate the search function.
See remapping keys in AHK.

Remap key combination (steelseries keyboard)

Within the steelseries engine it is very easy to change the basic key functionality. But I can not find an option to change what happens when you press a modifier key like 'shift' + that specific key.
I was wondering if anyone knows either a way of doing this in Steelseries engine, or another way perhaps using AHK or something of the sort?
It depends on what you are trying to do with the key binding. But yes you can capture shift+ another key with the syntax below.
+A::
MsgBox, Shift A was pressed!
return
+B::
Send, Shift B was pressed!
Return
To see a full list of the modifier hotkeys and the symbol to use for each you can look at Hotkeys

What is the key scan code of the Fn key for use in AutoHotkey (AHK)?

I want to use Fn+S to emulate Ctrl+S, and so far this is my code:
#InstallKeybdHook
#Persistent
SC126 & s::
Send ^{s}
return
My problem is that I don't know the Fn key's scan code.
How can I find it?
The Fn key does not have a scan code.
The keyboard driver does not expose the Fn key to the operating system, so basically your operating system (and therefore AutoHotkey) does not know that it exists.
When you press the Fn key in combination with a supported key, the keyboard driver reports a single key press to the operating system with a different scan code. Basically, it tells the operating system that a different key was pressed.
When you press the Fn key in combination with a supported key, the keyboard driver reports the presses to the operating system (Windows in this case).
You can find the Fn key scan code by:
Go to the tray icon
Right-click Script
Click Open
Click View and then Key History and Script Info (alternatively Ctrl + K)
Once you press the key, you can refresh (F5) and scroll to the bottom to see the codes
If you're trying to use a Mac keyboard and would like to map the Fn key to Insert (and also get other standard Windows keys, like PrintScreen), then you might want to try the 'hidfalum' driver. It's available here: http://www.bimoid.com/download/utils/hidfalum.zip

Caps lock rebound to ctrl generates Ctrl-Shift in emacs

I've rebound my caps lock key to be an additional ctrl key, but in emacs using the rebound key generates the C-S key combination. Pressing caps-p generates the sequence C-S-p, whereas using the the ctrl key to do the same generates C-p.
This results in some weird behaviour, such as C-n and C-p setting a mark and then highlighting the region that I go through.
I have not changed the definition of the caps key in X, instead using the setting built into my window manager (Cinnamon). Could this be what is causing the problem, or is this the intended behaviour of this key?
This question is probably relevant, basically just use xmodmap to set the keys directly. It worked for me when I had caps lock set to control and I think I was using gnome3 classic (which Cinammon is based on) at the time.
On a related note I'd also recommend having a look at space2ctrl, I found that reaching for caps lock all the time still hurt my fingers.
I'm running CrunchBang 10 "Statler" (derived from Debian 6 "Squeeze") on an Asus laptop
(yeah, I'm a little behind right now)
I've currently got GNU Emacs 23.2.1. It didn't even recognize the Caps Lock key as a keypress until I re-mapped it to Ctrl using xmodmap.
So first I created file ~/.Xmodmap:
! attempting to redefine the <Caps Lock> key to do <Ctrl>
remove Lock = Caps_Lock
add Control = Caps_Lock
Apparently Debian uses .xsession, vs..xinitrc.
file .xsession is where the window manager (Openbox) gets started with exec
I inserted the xmodmap call before the exec:
#!/bin/sh
# gonna modify the keys so <Caps Lock> is <Ctrl>
xmodmap /home/tom/.Xmodmap
exec openbox-session
The Caps Lock key seems to be working just like the Ctrl key
within Emacs now.
I also faced this problem before, my keyboard has problem with CTRL key. Maybe you have the same problem.