Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a Microsoft Digital Media 3000 Keyboard. None of the function keys or other special keys seem to do anything, what do I need to do to get them working (at the very least f2, as not having a shortcut to rename a file is driving me mad)

If I run xev and press f2 I get the following output in the terminal:

KeyPress event, serial 36, synthetic NO, window 0x4800001, root 0x15d, subw 0x0, time 42858728, (674,456), root:(1034,588), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x4800001, root 0x15d, subw 0x0, time 42858912, (674,456), root:(1034,588), state 0x10, keycode 139 (keysym 0xff65, Undo), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False

share|improve this question
    
First, are you sure that function keys are enabled? On my keyboard I have a key that enables/disables them... –  MiJyn Nov 28 '12 at 18:29
    
@MiJyn I believe so. When I boot into windows on this box, I don't have to do anything special for them to work. –  NikolaiDante Nov 28 '12 at 18:40
    
It seems to be a special keyboard with a different keymapping. I assume that you will have to install a driver (no idea which one though). –  MiJyn Nov 28 '12 at 18:43
2  
If you run xev and type 'f2' does it give you output? –  Seth Nov 28 '12 at 19:30
    
@iSeth edited to add the output –  NikolaiDante Nov 28 '12 at 19:45

1 Answer 1

up vote 2 down vote accepted
+50

Using xbindkeys and xte you should be able to remap the f2 key.

sudo apt-get isntall xbindkeys && sudo apt-get install xautomation

Create the xbindkeys configuration file

xbindkeys --defaults > $HOME/.xbindkeysrc

Now we need to edit the file: gedit $HOME/.xbindkeysrc

Scroll to the bottom of the file and create a new line.

Type:

“xte 'key F2'” 
0xff65

enter image description here

This should bind the f2 function key to F2. Let me know if it doesn't work.

You can do this for any of your keys, just get their keysym from xev.

Restart the computer.

share|improve this answer
    
Thanks, but F2 still doesn't do rename in file manager. Do I need to reboot to make the change take effect? –  NikolaiDante Nov 28 '12 at 23:23
    
Ah, I forgot a step. Editing now.... –  Seth Nov 28 '12 at 23:28
    
@NikolaiDante Edited. –  Seth Nov 28 '12 at 23:35
    
Found another mistake :/ Edited. Sorry about that. –  Seth Nov 29 '12 at 3:41
1  
There is an issue with the xbindkeys example file that mucks up CTRL-F and binds it to XTerm, we should delete it from the config file. –  NikolaiDante Nov 29 '12 at 18:40

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.