Code Del key in Ubuntu?

0 like 0 dislike
6 views
I bought a Apple keyboard Wireless, but in Ubuntu some problems arose. In particular, there is no Delete button on her familiar. It is, but it works via fn+Backspace, which is essentially uncomfortable.


Question — is there any hot key to tie any multimedia key to work instead of del? And how to do it?
by | 6 views

2 Answers

0 like 0 dislike
Figured out the problem. A short description of the solution.
\r
To start the keyboard settings (System-Preferences->Keyboard Shortcuts) remove a hotkey for Eject action (if you do not remove, I have not defined key code)
\r
Then you need to run the console program xev, hover over the window the mouse pointer and click on our button (the rightmost top). You should see the contents of the view:
\r
\rKeyPress event, serial 33, synthetic NO, window 0x6a00001,
root 0x1ad, subw 0x0, time 341204079, (115,93), root:(118,143),
state 0x0, keycode 169 (keysym 0x1008ff2c, XF86Eject), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
\r
KeyRelease event, serial 36, synthetic NO, window 0x6a00001,
root 0x1ad, subw 0x0, time 341204116, (115,93), root:(118,143),
state 0x0, keycode 169 (keysym 0x1008ff2c, XF86Eject), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
\r

\r
keycode 169 — code our keys.
\r
Then it's simple. in the console execute the following command:
\r
\rsudo xmodmap -e 'keycode 169 = Delete'
\r
If you need to change this to another key, use xev to find out the name of a key. It is recorded after the keysym. In our case, XF86Eject, one for Delete key is Delete, etc.
\r
I myself have redefined the F3 key and F4. System F3 and F4 keys work only with Fn, so they can safely use. I have now F3 places the cursor in the address bar in the browser, and F4 is happening refresh page (F5 only works via Fn and it is inconvenient during development).
\r
Still not used F1-F2 and F5-F6, but for some reason Xorg does not see, though at the core they are determined. But the codes from the kernel to Xorg not suitable. To deal with them yet I have failed.
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 21, 2019 by Don2Quixote
0 like 0 dislike
1 answer
asked May 21, 2019 by KudashVillie
110,608 questions
257,186 answers
0 comments
28,876 users