News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Fn key trouble

Started by jj2007, July 15, 2008, 11:56:15 PM

Previous topic - Next topic

jj2007

Just bought a cute little notebook. A bit too late I discovered that the blue Fn key sits to the left of Ctrl - and it's driving me mad!
Google was not very helpful so far. I checked the WM_KEYxx and WM_SYSKEYxx messages, and the bloody key has no scancode and does not trigger these messages. It seems the only chance is a low low level intervention via BIOS or driver or interrupts. Any ideas how to swap these two keys (without resoldering)?

GregL


donkey

It is perfectly possible that the key is not actually mapped, it may just modify the scancode of certain keys within the keyboard's internal controller and the 8042 is never aware that it has been pressed. In that case there is no VKey or scancode assigned to the key and no event is triggered when it is pressed.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

GregL

Yeah, if the key is not producing any scan codes, the method I posted probably won't work.


jj2007

Quote from: Greg on July 16, 2008, 02:00:19 AM
Yeah, if the key is not producing any scan codes, the method I posted probably won't work.

Indeed. Your method works fine to translate the CAPS key into a second Shift key, though.
Edgar, is the keyboard's internal controller programmatically accessible?

PBrennick

jj,
Donkey is correct, I have the same situation with my Sony notebook. There are keys to control the contrast, brightness, external/internal monitor, etc. They are definitely not mapped and there is no way as far as I can tell to read them. The area of memory (or the chip holding the memory, if it is OEM) IS accessable because I had to flash it at one time to fix a factory defect. It is not in the BIOS, though, at least not on my machine because the update did not register as an update to the BIOS. Its revision date stayed the same.

Please let me know if you have any success because I am currently in a situation where I would like to raise or lower the brightness programmatically since I lost the literature and it seems I can only make it darker with the FN key. Now, I am using an external monitor as a solution and it sucks as it is too far away for me to see well (call me gramps).

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website

P1

Quote from: jj2007 on July 15, 2008, 11:56:15 PMAny ideas how to swap these two keys (without resoldering)?
There is always the external keyboard route.  Those soft fold-up type.

Regards,  P1   :8)

jj2007

Quote from: P1 on July 16, 2008, 03:45:06 PM
There is always the external keyboard route.  Those soft fold-up type.

Regards,  P1   :8)

If that is the last resort, I prefer a full keyboard. Travelling is not a big problem, it's the daily use at home that sucks. Imagine you copy a text with Control, pardon: Fn C, close the editor without saving, and then try pasting it into another source... nasty scenario!
By the way, I am writing this text on a Dell notebook, Ctrl to the left, Fn right of Ctrl. There might be people who prefer it the other way round, but what I definitely dislike is the arrogance of manufacturers (in this case: MSI) who force their users to lose the ability to type without looking at the keyboard. Hey, Lingo, can't you find a solution in a high level language?

PBrennick

jj,
I am sure you need to give HIM the solution FIRST. Then, he will make it better?  :P

-- Paul
The GeneSys Project is available from:
The Repository or My crappy website

Tedd

The Fn key doesn't register at all to the OS, I think it signals on the SM-bus - which then takes the appropriate action for the key combination. The volume controls then produce the relevant events which the OS does catch and respond to; I don't think the brightness control is passed on, it just adjusts the backlight directly.
So, other than taking drastic action, I don't think you'll be able to 'fix' it.
That said, you do get used to it after a short while - and you'll find many laptop keyboards do the same. I had the same dislike of my keyboard layout at first (including the placement of the home, end, pgup, pgdn keys), but you get used to it after some use, and I've seen much worse layouts.
No snowflake in an avalanche feels responsible.

donkey

Quote from: jj2007 on July 16, 2008, 05:15:44 PM
Hey, Lingo, can't you find a solution in a high level language?
Since he's not participating in this thread why do you find it necessary to challenge him. This type of ongoing war and back and forth insults inevitably ends up like the Betov/Randall/Hutch fiasco over at A.L.A. and that does nothing by make me question whether I should continue visiting.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jj2007

Quote from: donkey on July 18, 2008, 01:51:28 AM
Quote from: jj2007 on July 16, 2008, 05:15:44 PM
Hey, Lingo, can't you find a solution in a high level language?
Since he's not participating in this thread why do you find it necessary to challenge him.

No war intended. I am just teasing the young man a little bit. I like Lingo, like myself he never gives up and is full of strange ideas. There was another post in the recent thread that I found really insulting, irrespectively of the fact that he "asked for it".

sinsi

Have you tried a bootable-roll-your-own-os? Intercept the IRQ and get the scancodes that way.
Even the BIOS has an interrupt you hook to get scancodes, although I imagine it comes from windows rather than the kbc.
Light travels faster than sound, that's why some people seem bright until you hear them.

jj2007

Sinsi, thanks. It seems that the Fn key does not even generate a scancode. Either it's at keyboard driver level, or even worse, the hardware acts only if two keys are pressed simultaneously...

MichaelW

The attachment is a 16-bit DOS app, with the C source code, that displays the scan codes returned by the KB controller. It works by installing a temporary handler for the keyboard hardware interrupt. Within limits it will work under Windows (Windows 98 SE and Windows 2000 tested), but to intercept all of the scan codes it must be run under some version of DOS, or under Windows 9x MS-DOS mode.

[attachment deleted by admin]
eschew obfuscation