The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Send function keys from i3

asked 2013-04-18 07:32:39 +0000

lzap gravatar image

Hello,

I have mapped my function keys to worspace switching. Now, I have a new keyboard which has extra keys that are mapped to XF86Launch1 to 9.

I would like to re-map those back to function keys, because they are out of reach, but I still want to keep the possibility to use function keys.

I tried to do it in XModMap, but without any success. What it does is it remaps but then i3wm changes the workspace:

keycode 192 = F1

Is there any way to remap or send the proper key within i3wm configuration using exec command?

edit retag flag offensive close merge delete

Comments

To me, it seems like everything behaves like you intended. Pressing the button that formerly sent XF86Launch1 now sends F1 and so on, thus i3 switches workspaces as you configured it to switch workspaces on F1 to F12. Pleasy clarify.

sur5r gravatar imagesur5r ( 2013-04-18 07:43:49 +0000 )edit

Yeah. I understand. What I want to have: F1 - switch workspace while XF86Launch1 would generate "F1" key. Basically, I want to swap them.

lzap gravatar imagelzap ( 2013-04-18 08:05:06 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-04-18 08:42:55 +0000

sur5r gravatar image

So you want to swap F1-F9 with XF86Launch1-XF86Launch9.

Example: Assuming F1 to F9 is originally on keycodes 67 to 75 and XF86Launch1 to 9 is on keycodes 192-200, then you would have to feed the following to xmodmap:

keycode 67 = XF86Launch1
keycode 68 = XF86Launch2
keycode 69 = XF86Launch3
keycode 70 = XF86Launch4
keycode 71 = XF86Launch5
keycode 72 = XF86Launch6
keycode 73 = XF86Launch7
keycode 74 = XF86Launch8
keycode 75 = XF86Launch9

keycode 192 = F1
keycode 193 = F2
keycode 194 = F3
keycode 195 = F4
keycode 196 = F5
keycode 197 = F6
keycode 198 = F7
keycode 199 = F8
keycode 200 = F9

You have to check the keycodes on your system, of course.

edit flag offensive delete link more

Comments

Right, and I need to also remap my i3 configuration to use these - this was the snag. ty

lzap gravatar imagelzap ( 2013-04-18 11:14:10 +0000 )edit

Question Tools

Stats

Asked: 2013-04-18 07:32:39 +0000

Seen: 2,237 times

Last updated: Apr 18 '13