Add keycodes for wireless button on Acer Travelmate 8100

Bug #57849 reported by Jools Wills
8
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

/usr/share/hotkey-setup/acer.hk would benefit from some additional lines adding the wireless button on and off keys.

on = e055
off = e056

for example

setkeycodes e055 $KEY_F13 # Wireless on
setkeycodes e056 $KEY_F14 # Wireless off

This is useful, as you can then configure some keys under X with xmodmap

for example:

keycode 182 = XF86User1KB
keycode 183 = XF86User2KB

And then you can configure hotkeys with kde to do something useful. I have it set up so that when I press the wireless button, kde does an ifup on the wireless device (wlan0).

Revision history for this message
Jools Wills (jools) wrote : Re: Add keycodes for wireless button on Acer Travelmate 8100 (fix included)

the file /usr/share/hotkey-setup/acer-aspire-1600.hk
is also suitable for the travelmate-8100 series.

I also un-commented the Wireless On/Off keys in this file. Why are they commented out? It is very useful to be able to map the "wireless on" button to something like "kdesu ifup wlan0"

so, on my system i copy

/usr/share/hotkey-setup/acer-aspire-1600.hk to

/usr/share/hotkey-setup/acer-travelmate-8100.hk

uncomment the wireless lines.

and in /etc/init.d/hotkey-setup i added an entry into the Acer case.
(Diff attached)

Revision history for this message
Jools Wills (jools) wrote :

Sorry. Ignore last patch. this is a working one.

Of course, other laptops from acer might also share these keys, so it might be better to add them into the generic acer one?

Revision history for this message
Paul Sladen (sladen) wrote :

Acer tend to make 'families' of laptops, all of which will share similar parameters. I think those two keys are commented out because:

  (a) the wifi switching is handled in hardware already
  (b) We don't have anything 'standard' to map them to

I can see the use-case of wanting to tie the key to an associated function, such as the 'ifup/ifdown'. If we don't actively do any remapping, the keys will be passed through as they are---possibly what you're relying on if the '$KEY_' part wasn't changed to anything.

Did you map the key to anything, or just leave it as is?

Changed in hotkey-setup:
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
Jools Wills (jools) wrote :

> (a) the wifi switching is handled in hardware already

on my laptop, in addition to sending a keycode it "turns on/off" the wireless, but this is not particularly useful unless you have some script constantly watching for it (It's not switched on/off in a way which is hotplug compatible) and then "ifupping" the interface. it doesn't work right with ifplugd anyway, as it doesn't "detect" when it is on. ifplugd will happily ifdown it though.

> (b) We don't have anything 'standard' to map them to
>Did you map the key to anything, or just leave it as is?

I forgot to mention that in my last message but i show it in the initial report. I mapped them to F13 and F14. I realise this isn't ideal, but as you pointed out there is nothing standard to map them to.

Revision history for this message
Jools Wills (jools) wrote :

ok. the last diff was rubbish too :/ (I'm having a bad day)

Attached is a fixed one, and working (I tested it this time).

Sorry about that.

Jools Wills (jools)
Changed in hotkey-setup:
status: Needs Info → Confirmed
Revision history for this message
Stefano Rivera (stefanor) wrote :

This should *definitly* bring up some kind of notification. Pressing the wireless button is easy to do by accident, and suddently it stops working.

The cause is *not* obvious (the wifi light still flashes). You have to go into kernel logs to see what has happened.

Maybe network-manager should have hooks on this?

Revision history for this message
Stefano Rivera (stefanor) wrote :

In fact, the correct response (for atheros cards) would be to rmmod ath_pci, and modprobe ath_pci.

If you don't do this, then the wifi still doesn't work after you unkill the wireless...

Steve Langasek (vorlon)
affects: hotkey-setup (Ubuntu) → udev-extras (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Please exercise the steps at https://wiki.ubuntu.com/Hotkeys/Troubleshooting to determine at which level your hotkey problems occur, and attach the collected information. Thanks!

affects: udev-extras (Ubuntu) → udev (Ubuntu)
Changed in udev (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Low → Medium
status: Confirmed → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in udev (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.