You are not logged in.

#1 2009-11-17 20:11:09

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Keyboard layout --> searching for scancodes?

Hi all,

I'm not satisfied with the default macintosh keyboard layout, so I want to customize my keymap also used in the console. (not the X.org layout).
I first wanted to figure out if all the keys have scancodes, but the method mentioned in the wiki using

dmesg | tail -5

doesn't work for me (it doesn't output anything and just quits).

How can I fix that problem or find out scancodes using another method?

Last edited by MrAllan (2009-11-17 20:11:57)

Offline

#2 2009-11-17 20:28:01

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Keyboard layout --> searching for scancodes?

The dmesg approach won't work for all types of keyboards. Try getscancodes:
http://aur.archlinux.org/packages.php?ID=28677
http://keytouch.sourceforge.net/howto_k … node4.html

(It is weird dmesg produces no output.)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2009-11-17 20:57:53

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: Keyboard layout --> searching for scancodes?

fsckd wrote:

The dmesg approach won't work for all types of keyboards. Try getscancodes:
http://aur.archlinux.org/packages.php?ID=28677
http://keytouch.sourceforge.net/howto_k … node4.html

(It is weird dmesg produces no output.)

Thanks, getscancodes works, unfortunately, the 'fn'-key doesn't seem to be recognized by the kernel. Is this due to lacking driver support?

Offline

#4 2009-11-17 21:02:36

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Keyboard layout --> searching for scancodes?

Is this one of those specially marked Fn keys seen on laptops and used in combination of other keys to emulate a key that would be on a larger keyboard? If yes, those keys are handled by the keyboard hardware and never seen by the OS. Or so IIRC.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2009-11-17 21:30:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,525

Re: Keyboard layout --> searching for scancodes?

instead of dmesg, try:

Press the unknown key then:

sudo tail /var/log/everything.log


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2009-11-18 05:08:38

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: Keyboard layout --> searching for scancodes?

you can use xev to find the keycodes.

Offline

#7 2009-11-18 21:03:32

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: Keyboard layout --> searching for scancodes?

fsckd wrote:

Is this one of those specially marked Fn keys seen on laptops and used in combination of other keys to emulate a key that would be on a larger keyboard? If yes, those keys are handled by the keyboard hardware and never seen by the OS. Or so IIRC.

Hm, it would have been great to use that mainly pointless key as the modifier key in Openbox, but oh well ...
On another note, their is the pommed daemon that makes keyboard illumination and brightness adjusting feasible on MacBooks. The bizarre thing is that the keys used to modify brightness / toggle sound do not have any scancodes, but are used by pommed nevertheless. How is that possible? Does pommed include some sort of kernel extension to access those keys?

Offline

#8 2009-11-19 15:02:24

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Keyboard layout --> searching for scancodes?

I don't own a Mac so I don't really know what's going on there. It might be those keys are presenting themselves as something else. Scancodes are what the keyboard sends to the OS. If a key doesn't have a scancode, your OS is not likely to see it as a key (if it sees it at all).


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB