flat assembler
Message board for the users of flat assembler.

Index > Windows > Fn keypress handling

Author
Thread Post new topic Reply to topic
keyoke



Joined: 18 Jun 2003
Posts: 56
Location: London
keyoke
Hi,
I know that the Fn keypress cannot be handled through the higher level windows apis because it needs to be in combination with another key before the keypress is registered.

But.... I was wondering if there was something I could do at a lower level using assembly.
Any ideas would be welcome.
Thanks
Post 22 Dec 2011, 14:46
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
I thought the Fn key went straight to the SMM code or is held by the KBD controller while waiting. If that is so then there is most probably nothing you can do in any CPU code (asm or other) to capture it.
Post 22 Dec 2011, 14:58
View user's profile Send private message Visit poster's website Reply with quote
keyoke



Joined: 18 Jun 2003
Posts: 56
Location: London
keyoke
damn ok, what about EFI I've never had much to do with EFI, but is there nothing that can be developed and loaded somehow pre-boot? sorry a bit vague need to read up on these technologies.
Post 22 Dec 2011, 15:07
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
Some Fn keystroke sequences never get to the non-system code. For example: my brightness keys (Fn+Up and Fn+Down) will work no matter what OS is running, even a crashed OS won't stop me from changing the brightness. The keystrokes go directly to the SMM code. To get access you would need to know how your chipset works internally and then set-up all the various control registers for SMM control.
Post 22 Dec 2011, 15:13
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1412
Location: Toronto, Canada
AsmGuru62
@keyoke: I do not understand your question: Fn keys are all coming into your window procedure with focus. Just use WM_KEYDOWN message. Or, are you asking about a different thing?
Post 22 Dec 2011, 17:36
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
AsmGuru62: Laptops have a "Fn" key for accessing extra functions.
Post 22 Dec 2011, 23:04
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1412
Location: Toronto, Canada
AsmGuru62
I see... there is a key Fn which ALTERS the meaning for F1-F12.
I thought that Fn meant Functional keys, like F1-F12.
Post 23 Dec 2011, 15:26
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
The Fn key alters the meaning of many other keys in addition to the F1-F12 keys.
Post 23 Dec 2011, 16:45
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
One observation - Windows probably can detect these keys. For example when I press Fn+F2 (WiFi on/off) Windows shows the information picture that displays "WiFi enabled" message.


Last edited by JohnFound on 23 Dec 2011, 17:16; edited 1 time in total
Post 23 Dec 2011, 17:09
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17287
Location: In your JS exploiting you and your system
revolution
JohnFound wrote:
One observation - Windows probably can detect these keys. For example when I press Fn+FF2 (WiFi on/off) Windows shows the information picture that displays "WiFi enabled" message.
Yes, when you press the second key in combination with Fn it is registered into Windows through the system board driver. I think the OP wanted to detect just the Fn keypress without a combination key.
Post 23 Dec 2011, 17:12
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.