Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a laptop with Ubuntu 12.04 and I want to send a Fn+F8 from a script in order to disable my touchpad.

When i type the command xdotool key fn, it prints

(symbol) No such key name 'fn'. Ignoring it.
(symbol) No such key name 'fn'. Ignoring it.

How can I send the Fn key?

----------------------------update June 13 ----------------------------------

So the Fn key can't be sent via program language? By looking at /usr/include/linux/input.h line 614 , I see:

#define KEY_FN 0x1d0

it also don't work by sending signal? Or it isn't the Fn key code?

----------------------------update June 26 ----------------------------------

in rencently, I did some test about Fn+F8 using C . I cat /dev/input/event3 and can see the Fn+F8 code is 240 which is

#define KEY_UNKNOWN     240

and some other code. I'm feeling blue. Maybe the touchpad is handled directly by the hardware as user49740 had said.

but the command can disable touchpad by os

xinput set-prop 'ETPS/2 Elantech Touchpad' 'Device Enabled' 0

however it can't change the touchpad light status. And the Fn+F8 can't enable or disable the touchpad .

share|improve this question

migrated from stackoverflow.com Jun 13 '12 at 7:05

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 1 down vote accepted

Pressing the Fn key does not send any keycode to the operating system, therefore you cannot fake pressing the Fn key.

However, some Fn+another key combinations send keycodes. For example, the play/pause/next/prev key combos always send keycodes

From a terminal, you can run the xev program, which opens a simple window. You can now press various keys and key combos and the keycodes received by X11 will be shown in the terminal. You can press Fn+F8 and see if xev shows any output

Unfortunately, on most laptops the 'disable touchpad' key combo is handled directly by the hardware, so you must find another way to disable the touchpad.

If you are using a Synaptics touchpad, you should look at synclient or syndaemon. For example, this article says that synclient TouchpadOff=1 turns off the touchpad and synclient TouchpadOff=0 turns it on

share|improve this answer

No. The Fn key is handled by hardware, not the OS.

share|improve this answer
    
so, the Fn key don't work using program language? only by hardware ? But I see C++ source code at line 614 in /linux/input.h . #define KEY_FN 0x1d0 it also don't work by sending signal? Or it isn't the Fn key code? –  Cyd Jun 13 '12 at 12:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.