Skip to content

Remapping two keys but they aren't recognised by xev/showkey

Hoy!

I'd like to remap or better switch two keys on my keyboard because the layout sucks for WM's

It's about the FN and the super key, see here:

MSI GL63

So the FN key should become the super key and vice versa.

​

first i had a look at xmodmap -pke but couldn't find them.

Afterwards i tried xev.

Pressing the FN key doesn't trigger anything alone.

FN + y gave that:

KeyPress event, serial 37, synthetic NO, window 0x3e00001,

root 0x5b8, subw 0x0, time 1394166, (268,499), root:(406,695),

state 0x10, keycode 52 (keysym 0x79, y), same_screen YES,

XLookupString gives 1 bytes: (79) "y"

XmbLookupString gives 1 bytes: (79) "y"

XFilterEvent returns: False

​

KeyRelease event, serial 37, synthetic NO, window 0x3e00001,

root 0x5b8, subw 0x0, time 1394167, (268,499), root:(406,695),

state 0x10, keycode 52 (keysym 0x79, y), same_screen YES,

XLookupString gives 1 bytes: (79) "y"

XFilterEvent returns: False

​

So no key for FN.

The Super key gave me this:

FocusOut event, serial 37, synthetic NO, window 0x4000001,

mode NotifyGrab, detail NotifyAncestor

​

FocusIn event, serial 37, synthetic NO, window 0x4000001,

mode NotifyUngrab, detail NotifyAncestor

​

KeymapNotify event, serial 37, synthetic NO, window 0x0,

keys: 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

​

no luck either.

I found a post that said to try showkey in the tty...whokay, let's go, sounds good!

FN alone and nothing happens, pressed with a key just shows me the key of the other one.

Pressing the super key gave me keycode 125.

Referring to xmodmap -pke that key is

keycode 125 = KP_Equal NoSymbol KP_Equal.

​

So has anyone an idea on how to get this stuff to work?

2 points2 comments
Open on Reddit
About this post
Posted
Archived
Score
2 · 100% up
Kind
Text
ID
gsfdmk

Author

13
posts
129
comments
2
media
View profile

2 comments

https://stackoverflow.com/questions/24423724/finding-the-scan-code-of-fn-key

The Fn key does not have a scan code.

The keyboard driver does not expose the Fn key to the operating system, so basically your operating system (and therefore AutoHotkey) does not know that it exists.

When you press the Fn key in combination with a supported key, the keyboard driver reports a single key press to the operating system with a different scan code. Basically, it tells the operating system that a different key was pressed.

So the only way would be to tweak your driver somehow, but I have never heard of that being done, if it is even possible.

2 points

That's helpful, thanks...well or at least an explanation. Not nice, tho :/ the alt key is often used by gui applications that's why i wanted to avoid that.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.