You are not logged in.

#1 2008-09-19 22:08:22

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

showkey ok, xev nothing

Another nice day with linux: decided to move to openbox and map shortcuts using xbindkeys. As I am sitting in front of a ThinkPad T41, why not move the Access IBM button mapping from acpi handler to xbindkeysrc. Now the problem: the blue Access IBM button doesn't generate any events in X (xev doesn't see anything...), but running showkey in console actually reports:

keycode 360 press
keycode 360 release

showkey -s is as blind as xev thou...
Is it possible to map the Access IBM button using xbindkeys?
Googling revealed that ubuntu uses some sort of acpi wrapper called acpi_fakekey, anyone using it?

Offline

#2 2008-09-19 22:36:55

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: showkey ok, xev nothing

Have you tried "xbindkeys -k" ?
When you run that it will listen for a single keystroke and then give you the keycode, which you can use in your config file.

Try that first.


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-09-20 20:45:04

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: showkey ok, xev nothing

neither xbindkeys -k nor xbindkeys -mk report keyspresses

Offline

#4 2008-09-21 23:29:36

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: showkey ok, xev nothing

That doesn't make any sense! How can showkey -k (-k is the default if no switches are supplied) know what's going on if showkey -s doesn't see the key? The usual pipeline is:

* key scan codes are detected, these are reported by showkey -s
* they're translated into keycodes. (setkeycodes can come in here and change what happens). The keycodes are reported by showkey -k
* your keymap file translates keycodes into keysyms.

That's all at the Linux/console level. I haven't figured out yet which if any of the early stages of this may affect the X keyboard handling. The later stages of this and the X keyboard handling are independent. If you're trying to get things working in X, you might just fuss around at the X level, but if I were trying to troubleshoot your problem, I'd try to figure out what's going on with showkey -k vs -s.

Offline

#5 2008-09-22 12:42:42

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: showkey ok, xev nothing

After pressing the key, take a look at the end of 'dmesg'.

Also

http://wiki.archlinux.org/index.php/Extra_Keyboard_Keys

might help.

mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#6 2008-09-22 19:26:46

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: showkey ok, xev nothing

I have the same key on X61 (generates 360 on the console).

I think the deal is that acpid seizes that event first, and doesn't let it go further to X (at least that's how I understand it, but I might be quite wrong).

So, have a look at /var/log/acpid.log (or just run acpi_listen), you'll see that pressing that blue key generates an event (if you have acpid running, that is). Now if you want to assing an action to it, edit /etc/acpi/handler.sh (but it carries some disadvantages, like it's run with root privileges (like acpid), and you need to manually specify DISPLAY if you want to run an X application).

Offline

#7 2008-09-23 22:22:16

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: showkey ok, xev nothing

Profjim wrote:

That doesn't make any sense! How can showkey -k (-k is the default if no switches are supplied) know what's going on if showkey -s doesn't see the key? The usual pipeline is:

* key scan codes are detected, these are reported by showkey -s
* they're translated into keycodes. (setkeycodes can come in here and change what happens). The keycodes are reported by showkey -k
* your keymap file translates keycodes into keysyms.

That's all at the Linux/console level. I haven't figured out yet which if any of the early stages of this may affect the X keyboard handling. The later stages of this and the X keyboard handling are independent. If you're trying to get things working in X, you might just fuss around at the X level, but if I were trying to troubleshoot your problem, I'd try to figure out what's going on with showkey -k vs -s.

I agree with you absolutely! That just doesn't make any sense at all...
I think it might be due to acpid, because the key is recognized through thinkpad_acpi, which sends events to acpid. I am going to look further into this and will report what I found out.

Offline

#8 2008-09-23 22:23:52

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: showkey ok, xev nothing

Mektub wrote:

After pressing the key, take a look at the end of 'dmesg'.

Also

http://wiki.archlinux.org/index.php/Extra_Keyboard_Keys

might help.

mektub

dmesg reports nothing!

Offline

#9 2008-09-23 22:25:11

jarda-wien
Member
Registered: 2008-03-13
Posts: 104

Re: showkey ok, xev nothing

bender02 wrote:

I have the same key on X61 (generates 360 on the console).

I think the deal is that acpid seizes that event first, and doesn't let it go further to X (at least that's how I understand it, but I might be quite wrong).

So, have a look at /var/log/acpid.log (or just run acpi_listen), you'll see that pressing that blue key generates an event (if you have acpid running, that is). Now if you want to assing an action to it, edit /etc/acpi/handler.sh (but it carries some disadvantages, like it's run with root privileges (like acpid), and you need to manually specify DISPLAY if you want to run an X application).

I know I can do whatever I want with the key through acpid, but still, it would be far better to handle all key events in one utility.

Offline

Board footer

Powered by FluxBB