Jump to content

Fix for function keys in Linux with the FVWM window manager


GeneCash

Recommended Posts

(Mods: I don't know if this belongs here or in a support or dev topic, please move if necessary)

I've used the FVWM window manager in Linux for 10 or 15 years now, and for all the time I've played KSP, I've not had working function keys, so I've had to either redefine them or do without. I use a ton of function keys in the window manager for moving/resizing/switching/iconifying/etc and so these aren't available to standard programs unless I tell FVWM to make them available.

Normally in the ~/.fvwm/config file, if you say:

Key (VirtualBox) F2  W A --

then it releases F2 for use by VirtualBox when it has the keyboard focus. I do that for rdesktop and 3 or 4 other programs. Works as documented.

Except for KSP. And this happens in all versions so far, all the way back to 0.20.2

For KSP, you need to use:

Key (Kerbal*Program) F1  W A FuncUseless
Key (Kerbal*Program) F2  W A FuncUseless
Key (Kerbal*Program) F3  W A FuncUseless
Key (Kerbal*Program) F4  W A FuncUseless
Key (Kerbal*Program) F5  W A FuncUseless
Key (Kerbal*Program) F6  W A FuncUseless
Key (Kerbal*Program) F7  W A FuncUseless
Key (Kerbal*Program) F8  W A FuncUseless
Key (Kerbal*Program) F9  W A FuncUseless
Key (Kerbal*Program) F10 W A FuncUseless
Key (Kerbal*Program) F11 W A FuncUseless

DestroyFunc FuncUseless
AddToFunc FuncUseless
+ I Echo FuncUseless

I stumbled across this fix recently. Put this in your ~/.fvwm/config file.

The strange thing is FuncUseless runs and puts the message in the log, BUT it does not consume the function keystroke like it's supposed to, and KSP gets it.

I don't know what's going on. Unity does do some wacky stuff under the hood to make games work nice in X11. And FVWM keystroke stuff is kind of buggy anyway, and mostly isn't actively supported much.

I'm sure nobody out there uses FVWM, so I hope I've helped both people... I'm posting this because it did take me 5 years to figure it out.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...