Name of utilities buttons

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Songeeef

Name of utilities buttons

31 May 2016, 05:54

Hello everyone,

I have this thing on my Asus laptop, which is that I have to hold the Fn button + F1 F2 F3 etc to use the "utilities buttons" (Brigthness and volume level & co).
It's been a while I wanted to change this (the other way around, so have to hold the Fn to use F1 F2 F3 and be able to change volume or brightness by using a single button), so I tried today. I prefer to warn you now, I'm an humble computer user, I have close to no knowledge in this domain.

- First thing I did was checking every possible options on my computer ; obviously, none matched my need.
- Second, I opened every single .exe in my Asus installation folder to see if there was anything modifiable (and notably keyboard.exe ...). Nop.
- Third, I tried to access the BIOS, see if there were anything modifiable - you can laugh at me, but I couldnt even access the Settings, it asks me to press the button "+/-", I tried to press everything, couldnt find it.
- 4th, I finally tried to write myself a script and use our dear AutoHotKey ; MIRACLE ! It works.
I used
F10::Volume_Mute
F11::Volume_Down
F12::Volume_Up
Volume_Mute::F10
Volume_Down::F11
Volume_Up::F12

Works perfectly fine, it does exactly what I'm looking for, which is exchanging the two actions !
Sadly, I cant seem to find the appropriate phrasing for the rest of the utilities buttons.
I will link you a picture
http://i.imgur.com/EqRse5J.jpg
So
F1 being "put computer to sleep"
F2 being "activate/deactivate wifi"
F3 being "lower keyboard brightness"
F4 being "increase keyboard brightness"
F5 being "lower display brightness"
F6 being "increase display brightness"
F7 being "shut screen" (screen shut off but everything keep working)
F8 being "share, duplicate, extend § co. the screen"
F9 being "I honestly dont know" (probably stop sharing the screen?)
F10, F11 and F12 being shut volume and lower/increase volume, the 3 buttons I did.

So if you guys know the correct "sentences" to be able to make those actions works in a script, I'll be forever in your debt.
Otherwise, maybe we could work an other way ? eg put F10::Volume_Mute and Fn+F10::F10 (i dont know the correct "phrasing" for Fn+F10)

Thanking you guys in advance !
AllUrBaseRBelong2Us
Posts: 35
Joined: 09 Nov 2015, 11:15

Re: Name of utilities buttons

01 Jun 2016, 06:16

F1 is pretty simple:

Code: Select all

F1::DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
F7 might be locking the computer

Code: Select all

DllCall("LockWorkStation")
Not sure about the rest.
ChrisMiller
Posts: 9
Joined: 30 May 2016, 15:51

Re: Name of utilities buttons

01 Jun 2016, 06:27

Hi,
check out the KeyHistory function. It'll will tell you which buttons actually are sent.
I have "Undo" and "Redo" Buttons on my keyboard. If I press one of them this gets displayed in my keyhistory:

Code: Select all

A2  01D	a	d	2.15	LControl       	
5A  015	a	d	0.00	z              	
5A  015	a	u	0.00	z              	
A2  01D	a	u	0.00	LControl      
In my situation its just a simple Ctrl + Z, hopefully it'll display all your actual keys aswell :)
qwerty12
Posts: 468
Joined: 04 Mar 2016, 04:33
Contact:

Re: Name of utilities buttons

01 Jun 2016, 06:47

Songeeef wrote: F2 being "activate/deactivate wifi"
Impossible to do the way ASUS does it unless you reverse their Wireless Console application and figure out the IOCTLs it sends to the ATKACPI driver. I did it once by calling a DSDT ACPI method (can't remember the name now, but you'd probably find it on Hackintosh forums with a driver for the hotkeys) using Aida64's ACPI Tool, but that's not scriptable. Another way would be to use a driver like WinRing0 or TVicPort to write into the laptop's EC directly (you'd have to look through the DSDT code for the offsets etc.), but that's problematic if both the DSDT code and WinRing0 etc. are writing at the same time...
F3 being "lower keyboard brightness"
F4 being "increase keyboard brightness"
Same as the above, pretty much. (Or you'd have to write your own driver to call the right methods in the DSDT.)
F5 being "lower display brightness"
F6 being "increase display brightness"
Look for jNizM's Monitor class posted somewhere on this forum.
F7 being "shut screen" (screen shut off but everything keep working)
It's been a long time since I've looked (I have vague memories of getting that to work on OS X), but I'm still pretty sure that's done by the laptop's ACPI code, which overrides the current brightness setting. Setting the brightness really low may do the same thing.
F8 being "share, duplicate, extend § co. the screen"
Run DisplaySwitch.exe
F9 being "I honestly dont know" (probably stop sharing the screen?)
It disables the touchpad. You may be able to get one of the many userspace processes belonging to ATKACPI to do this by sending one of them the right window message, but otherwise, you'd have to look at the SDK documents of your touchpad's manufacturer (if it's Synaptics, I'm pretty sure there's lots of code out there to do that)

The only ASUS laptop I have is bricked (and I don't lament its passing), so I can't offer any help beyond my vague statements here. (And even if I knew how, I wouldn't be able to write a driver.)
Songeeef

Re: Name of utilities buttons

01 Jun 2016, 09:47

Wow ... Thanks a lot for your answers, thats a more lot than I expected!
Only thing is that i'm lost ... Aha .. As I said, I'm frankly groping around expecting things to work one day or another, eventually.
I appreciate all your answers, but I'm afraid it's way too complicated for me to get anything close to solve my issue.
Only thing that got me hoping was the KeyHistory that would display the code associated to my Fn button.
I tried to load thet "KeyHistory", which seem to be a simple task, but even that, I cant manage to do it.
I simply tried to run those #KeyHistory 0, #KeyHistory lines into a .ahk file, but it doesnt seem to do anything.
Could you guys kindly explain to me the steps I'm supposed to do ?
I'm sorry to come to you that lost, it's not that I'm not trying I've read a lot of stuff but it simply goes beyond my understanding.

Thanks again for your time and all your help !
Songeeef

Re: Name of utilities buttons

01 Jun 2016, 09:51

Sadly I cant edit my previous message.

Just wanted to say another thing ; while running my script for the volume
F10::Volume_Mute
Volume_Mute::F10
F11::Volume_Down
Volume_Down::F11
F12::Volume_Up
Volume_Up::F12

It works well, even with VLC opened, but with some app (at least one, being a game), it doesnt work, its just the older way, Fn+f10 to mut etc
Any clue why, and how to change that ?
ChrisMiller
Posts: 9
Joined: 30 May 2016, 15:51

Re: Name of utilities buttons

02 Jun 2016, 01:16

Hi Songeeef,
with #KeyHistory 0 you'll deactivate any logging of the keys you pressed. There is no need to put anything special in you script. Just run it, doubleclick the taskbar icon and press Ctrl+K (View -> KeyHistory and Script Info) in the upcoming window.

About your game where the hotkeys wont work, check out this: https://autohotkey.com/docs/commands/_I ... bdHook.htm
Songeeef

Re: Name of utilities buttons

02 Jun 2016, 11:54

Thanks a ton Chris !
Unfortunately, my Fn button seems to not match any hotkey ... Its just plain blank, every other buttons come up with something, but not this one :/ Grr
As for the link for KbdHook, it works perfectly. Thanks a lot !!
ChrisMiller
Posts: 9
Joined: 30 May 2016, 15:51

Re: Name of utilities buttons

02 Jun 2016, 16:01

Did you check your bios for a hotkey legacy mode or similar?
Songeeef

Re: Name of utilities buttons

03 Jun 2016, 00:07

Errrr, the KeybdHook seemed to work for a while, and suddenly now it doesnt work anymore whenever I run the game. Wth ?
And I tried to check the bios, but for real I can run through the bios but to access the settings they ask me to press the button "+/-" which is ... Inexistent. I tried to press + (which is Shift+1), 1, - ... I litterally tried every button. I'm desperate. Desperately bad, but most of all desperate.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Name of utilities buttons

03 Jun 2016, 00:23

Songeeef wrote:Unfortunately, my Fn button seems to not match any hotkey ...
This is mostly universal, with few exceptions. The Fn key doesn't generate an event like most other keys, but you would be able to get the state of it using AHKHID.

I'm guessing that's the European version of the Zenbook? I have an American (qwerty) version myself. Pressing shift to access them in BIOs shouldn't be an issue, as a standard qwerty board has one key for both = and +. What you're implying is that there isn't a real driver for your specific keyboard and it's trying to operate off an incorrect driver that doesn't include those keys. Only thing that would make sense to me. That's highly unlikely, but you could always plug in a USB keyboard that has a dedicated =/+ key and use that instead.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
Songeeef

Re: Name of utilities buttons

03 Jun 2016, 09:49

And I was thinking it was a simple problem ... Day after day its more complicated aha !
And yes, European version of the Zenbook. Well there is quite some, but I have the QWERTZ (which is basically the equivalent of a QWERTY with the X and the Y exchanged and the accents for é è ü ö à ä etc way easier to reach) and there is no dedicated button to +/-. Maybe I can try to switch my keyboard to US in the parameters and push the associated button ? Could you kindly indicate me which button it is.

Thanks!
Songeeef

Re: Name of utilities buttons

03 Jun 2016, 09:51

And I was thinking it was a simple problem ... Day after day its more complicated aha !
And yes, European version of the Zenbook. Well there is quite some, but I have the QWERTZ (which is basically the equivalent of a QWERTY with the X and the Y exchanged and the accents for é è ü ö à ä etc way easier to reach) and there is no dedicated button to +/-. Maybe I can try to switch my keyboard to US in the parameters and push the associated button ? Could you kindly indicate me which button it is.

Thanks!
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Name of utilities buttons

03 Jun 2016, 13:28

It would be directly left of the backspace (your ^ key), but can't say that'll work. I've never changed my keyboard layout, don't know the affects it would have in BIOs.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Mateusz53, MrHue, mstrauss2021 and 316 guests