• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

how to keybind windows 10 stuff??

Morgoth

Fueled by Sapphire
Joined
Aug 4, 2007
Messages
4,254 (0.65/day)
Location
Netherlands
System Name Wopr "War Operation Plan Response"
Processor 5900x ryzen 9 12 cores 24 threads
Motherboard aorus x570 pro
Cooling air (GPU Liquid graphene) rad outside case mounted 120mm 68mm thick
Memory kingston 32gb ddr4 3200mhz ecc 2x16gb
Video Card(s) sapphire RX 6950 xt Nitro+ 16gb
Storage 300gb hdd OS backup. Crucial 500gb ssd OS. 6tb raid 1 hdd. 1.8tb pci-e nytro warp drive LSI
Display(s) AOC display 1080p
Case SilverStone SST-CS380 V2
Audio Device(s) Onboard
Power Supply Corsair 850MX watt
Mouse corsair gaming mouse
Keyboard Microsoft brand
Software Windows 10 pro 64bit, Luxion Keyshot 7, fusion 360, steam
Benchmark Scores timespy 19 104
i need to know if there is a way how i can keybind windows volume settings to my keyboard like using + - on numpad for volume controll
 
:( You told us nothing about your keyboard!

Many keyboards support volume control. My kb lets me turn up, turn down and mute among many other things. However, it requires I install the software that comes with the keyboard - otherwise, the basic drivers integrated with all operating systems is used.

Go to your keyboard's website and look for special drivers or software.
 
i need to know if there is a way how i can keybind windows volume settings to my keyboard like using + - on numpad for volume controll


unless your keyboard has specific keys for those functions, for example my keyboard has three keys above the keypad for that, mute, vol up and down.....

you will want to look at some software that can do it. an AHK script can make that work easily. here's a script that will do just that. change the hotkeys to what you want. currently uses F12 to mute, Numpad + to increase volume, Numpad - to decrease, and if you want to use a hotkey to end this script, hit escape.

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force

;Mute Volume
F12::SoundSet, 0
Return

;Increase Volume
NumpadAdd::Send {volume_Up}
Return

;Decrease Volume
NumpadSub::Send {Volume_Down}
Return

;End Script
Esc::ExitApp

stick that script into a text file but name it whatever you want and be sure to save as .ahk file extension

download the portable version of AHK, place it wherever you want. now when you click on the AHK file you made tell it to use the AHK exe (I recommend to use "AutoHotkeyU64.exe") as the program to open .ahk files.

for the download go here https://www.autohotkey.com/download/
and download that zip file. unpack it where ever you please, folder or drive doesn't matter
1677337448311.png


Any of the 3 exe will "work" but I'm suggesting this one for best compatibility
1677337696077.png
 
thx my new keyboard doest have the sound vollume butons on it. if it did i wouldt have ask it here :)
some generic cheap 10 euro keyboard . rather buy cheap keyboard if i spill something on it. woudlt boter me mutch to get a new one again for 10 than wasting 80 on a keyboard

and i got they script working
 
thx my new keyboard doest have the sound vollume butons on it. if it did i wouldt have ask it here
Well, can't read minds here. We have no clue what your keyboard has, or doesn't have, unless you tell us. If it is cheap with no extras, or expensive with many, unless you tell us. Nor do we have any clue as to what you know, or don't know, unless you tell us.

But I will say even many cheap keyboards are programmable.
 
unless your keyboard has specific keys for those functions, for example my keyboard has three keys above the keypad for that, mute, vol up and down.....

you will want to look at some software that can do it. an AHK script can make that work easily. here's a script that will do just that. change the hotkeys to what you want. currently uses F12 to mute, Numpad + to increase volume, Numpad - to decrease, and if you want to use a hotkey to end this script, hit escape.



stick that script into a text file but name it whatever you want and be sure to save as .ahk file extension

download the portable version of AHK, place it wherever you want. now when you click on the AHK file you made tell it to use the AHK exe (I recommend to use "AutoHotkeyU64.exe") as the program to open .ahk files.

for the download go here https://www.autohotkey.com/download/
and download that zip file. unpack it where ever you please, folder or drive doesn't matter
View attachment 285452

Any of the 3 exe will "work" but I'm suggesting this one for best compatibility
View attachment 285453
hi could you help me modifi the script a bit?
add hotkeys to stop and play current video on numlock keys
and is it posible to auto start the script on windows start up?
 
hi could you help me modifi the script a bit?
add hotkeys to stop and play current video on numlock keys
and is it posible to auto start the script on windows start up?

Sure, here ya go. Replace the old one with this new version below. I have cleaned it up from last time. Not sure exactly of the use case I went perhaps further than needed. I tested with VLC and WMP so both of those will work, but VLC works best/perfect (check spoiler). YMMV with other media players. NumLock will toggle play/pause. Shift + NumLock will stop playback.

Also made the mute hotkey actually toggle mute. The first way I did it was to set the volume value to 0 so it didn't toggle back to the non-muted value

I did run into a really strange oddity....or, at least it's odd to me. Who knows, maybe it's my keyboard being funny. If you have anything selected like a file or folder and the folder (or the desktop) that contains the selected file or folder is the active window, the NumLock hotkey doesn't respond to just WMP if WMP is not in focus?! (But Shift + NumLock does lmao...even weirder!.....and VLC works fine no matter what!) No idea wtf is going on with this. If I click off having any file or folder selected or at least make a different window active if anything is selected, all hotkeys work fine. But if I have anything selected like this and WMP is not in focus, the NumLock hotkey doesn't work just for WMP. So just a warning about how this behaved for me during testing

Lesson of this story.....VLC is better than WMP....which everyone already knows anyways! :cool:

Code:
#SingleInstance Force

;Toggle Play/Pause of Media Player
NumLock::
If (WinExist("ahk_exe vlc.exe"))                    ;Checks if VLC is open
    {
     If (WinActive("ahk_exe vlc.exe"))              ;Checks if VLC is active window
        Send {Media_Play_Pause}                     ;Toggles Play/Pause of VLC when it's in focus
     Else
        ControlSend, , {Space}, ahk_exe vlc.exe     ;Toggle Play/Pause of VLC when it's not in focus
    }
Else
    Send {Media_Play_Pause}                         ;Toggle Play/Pause of any other "media player" regardless of focus
Return

;Stops Media Playback
+NumLock::                                          ;Shift & NumLock
If (WinExist("ahk_exe vlc.exe"))                    ;Checks if VLC is running
    {
     If (WinActive("ahk_exe vlc.exe"))              ;Checks if VLC is active window
        Send {Media_Stop}                           ;Stops VLC when it's in focus
     Else
        ControlSend, , s, ahk_exe vlc.exe           ;Stops VLC when it's not in focus
    }
Else
    Send {Media_Stop}                               ;Stops any other "media player" regardless of focus
Return

;Toggle Mute/Unmute Volume
F12::Send {Volume_Mute}

;Increase Volume
NumpadAdd::Send {volume_Up}

;Decrease Volume
NumpadSub::Send {Volume_Down}

;End Script
Esc::ExitApp


startup at windows is easy peasy. put the script file into the windows startup folder

C:\Users\{USER NAME HERE}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

alternatively can get there by opening the Run app and running "shell:startup" (but without the quotes)
 
Last edited:
Back
Top