Need keysym code of the FN key -- how?
Hi guys, I finally got a new keyboard after muddling along with my supernice one that was rapidly dying. Many errors, repeating keys, skips; cable had to be exactly the right angle; lights went out, etc. It needs rewiring. A soldering iron is on its way, whenever the lender can drop it off here, which clearly will not be today. Meanwhile the new one is almost okay, even if it is plastic. This is a Perixx PERIBOARD-502 PLUS, Wired USB Keyboard with Touchpad. BUT -- it has one serious fault. On this keyboard, the outboard key on the lower left side is FN but it needs to be CTRL. The CTRL key is in the wrong place. I use this key hundreds of times/day. So I need to remap this key to be the CTRL key. I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method. Without the code, I can't xmodmap this key. I need output like this: KeyRelease event, serial 34, synthetic NO, window 0x4600001, root 0x111, subw 0x0, time 1003909681, (508,-351), root:(512,327), state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False -- where the part in parentheses after keysym contains the code I need. The manufacturer said they would check with their R&D, but it might take several days. Some solutions to issues like these say this can be done in the BIOS, but there's no guarantee, and I don't want to mess with the BIOS anyway. Is there another way I can find the keymap code for this key? Some keep-it-simple method that won't fry my overheated brain? Thanks very much, Liz J
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
Oh. Well, that explains why I can't get the keymap code, thank you. I guess that explains why it's a fix in the BIOS too, if the BIOS will do it. But I need the keymap code. Need to do CTRL-C and CTRL-V a zillion times/day, but the distance between CTRL and C and V in this keyboard is too short. If CTRL was an inch to the left, life would be normal & arthriitic effects would be reduced. Thank you very much, Mike. Liz On 3 July 2012 18:32, Mike Frysinger <vapier@gentoo.org> wrote:
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
More specifically, it is handled by the ACPI BIOS in SMM (system management mode). You might be able to hook it via acpid, but probably not in a suitably complete way to emulate Ctrl for all uses. I was able to create a custom action Fn+F9 on my laptop to power down the optical/hard drive bay so I could eject it. On Tue, Jul 03, 2012 at 06:52:21PM -0400, E Johnson wrote:
Oh. Well, that explains why I can't get the keymap code, thank you.
I guess that explains why it's a fix in the BIOS too, if the BIOS will do it.
But I need the keymap code. Need to do CTRL-C and CTRL-V a zillion times/day, but the distance between CTRL and C and V in this keyboard is too short. If CTRL was an inch to the left, life would be normal & arthriitic effects would be reduced.
Thank you very much, Mike.
Liz
On 3 July 2012 18:32, Mike Frysinger <vapier@gentoo.org> wrote:
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
-- - Chuck (0 Days until IPv4 depletion: http://ipv4depletion.com/)
How did you create the custom action?? (need the commnds) Thanks Liz On 3 July 2012 22:22, Chuck Anderson <cra@wpi.edu> wrote:
More specifically, it is handled by the ACPI BIOS in SMM (system management mode). You might be able to hook it via acpid, but probably not in a suitably complete way to emulate Ctrl for all uses. I was able to create a custom action Fn+F9 on my laptop to power down the optical/hard drive bay so I could eject it.
On Tue, Jul 03, 2012 at 06:52:21PM -0400, E Johnson wrote:
Oh. Well, that explains why I can't get the keymap code, thank you.
I guess that explains why it's a fix in the BIOS too, if the BIOS will do it.
But I need the keymap code. Need to do CTRL-C and CTRL-V a zillion times/day, but the distance between CTRL and C and V in this keyboard is too short. If CTRL was an inch to the left, life would be normal & arthriitic effects would be reduced.
Thank you very much, Mike.
Liz
On 3 July 2012 18:32, Mike Frysinger <vapier@gentoo.org> wrote:
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
-- - Chuck (0 Days until IPv4 depletion: http://ipv4depletion.com/) _______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
See here for the gory details. As you can see, there is pretty much no easy way to turn Fn into a generic key, especially not a Ctrl key. There may be a hard way that involves loading a custom ACPI DSDT and creating custom actions for every combination of Fn and every other key--if there are even enough non-overlapping codes to do it. Also bare in mind that these are IBM/Lenovo ThinkPad specific docs: http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work http://www.thinkwiki.org/wiki/How_to_hotswap_Ultrabay_devices On Tue, Jul 03, 2012 at 10:29:27PM -0400, E Johnson wrote:
How did you create the custom action?? (need the commnds) Thanks Liz
On 3 July 2012 22:22, Chuck Anderson <cra@wpi.edu> wrote:
More specifically, it is handled by the ACPI BIOS in SMM (system management mode). You might be able to hook it via acpid, but probably not in a suitably complete way to emulate Ctrl for all uses. I was able to create a custom action Fn+F9 on my laptop to power down the optical/hard drive bay so I could eject it.
On Tue, Jul 03, 2012 at 06:52:21PM -0400, E Johnson wrote:
Oh. Well, that explains why I can't get the keymap code, thank you.
I guess that explains why it's a fix in the BIOS too, if the BIOS will do it.
But I need the keymap code. Need to do CTRL-C and CTRL-V a zillion times/day, but the distance between CTRL and C and V in this keyboard is too short. If CTRL was an inch to the left, life would be normal & arthriitic effects would be reduced.
Thank you very much, Mike.
Liz
On 3 July 2012 18:32, Mike Frysinger <vapier@gentoo.org> wrote:
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
Thanks Chuck. I had seen the Lenovo fixes, but that didn't seem to fit this situation. At least now, in these explanations, I can see why it's often suggested to remap the CapsLock as an extra CTRL key. Others suggest physically rewiring the thing; switching the wires. That isn't possible in this one. This is a $30 plastic keyboard that should have cost 9 bucks max. I'll rewire the nice but sick one, whenever the soldering iron is dropped off here. Thanks again everyone. Liz On 4 July 2012 02:49, Chuck Anderson <cra@wpi.edu> wrote:
See here for the gory details. As you can see, there is pretty much no easy way to turn Fn into a generic key, especially not a Ctrl key. There may be a hard way that involves loading a custom ACPI DSDT and creating custom actions for every combination of Fn and every other key--if there are even enough non-overlapping codes to do it. Also bare in mind that these are IBM/Lenovo ThinkPad specific docs:
http://www.thinkwiki.org/wiki/How_to_get_special_keys_to_work
http://www.thinkwiki.org/wiki/How_to_hotswap_Ultrabay_devices
On Tue, Jul 03, 2012 at 10:29:27PM -0400, E Johnson wrote:
How did you create the custom action?? (need the commnds) Thanks Liz
On 3 July 2012 22:22, Chuck Anderson <cra@wpi.edu> wrote:
More specifically, it is handled by the ACPI BIOS in SMM (system management mode). You might be able to hook it via acpid, but probably not in a suitably complete way to emulate Ctrl for all uses. I was able to create a custom action Fn+F9 on my laptop to power down the optical/hard drive bay so I could eject it.
On Tue, Jul 03, 2012 at 06:52:21PM -0400, E Johnson wrote:
Oh. Well, that explains why I can't get the keymap code, thank you.
I guess that explains why it's a fix in the BIOS too, if the BIOS will do it.
But I need the keymap code. Need to do CTRL-C and CTRL-V a zillion times/day, but the distance between CTRL and C and V in this keyboard is too short. If CTRL was an inch to the left, life would be normal & arthriitic effects would be reduced.
Thank you very much, Mike.
Liz
On 3 July 2012 18:32, Mike Frysinger <vapier@gentoo.org> wrote:
On Tuesday 03 July 2012 17:10:12 E Johnson wrote:
I can run xev to get the keymap codes, for all keys but this FN key. Apparently the FN key won't give any output by itself, at least not using this method.
many (most?) keyboards process FN in hardware. the OS doesn't get a chance to see it. so if you do FN+down arrow to get page down, it's the keyboard itself that is sending the "page down" key. the OS doesn't see "FN+down arrow" and translate it to "page down" in software. -mike
Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug
participants (3)
-
Chuck Anderson
-
E Johnson
-
Mike Frysinger