Valheim

Valheim

[Linux] Function keys not working in Valheim
Having issues using the function keys inside games. My direct example will be Valheim. F2 usually brings up some game information, F5 will bring up a in-game console. at least when playing on a Windows machine. However when playing on Linux Mint, pressing F2 & F5 does nothing. I use the same keyboard between both PCs, so it must be a software issue.

Behavior. When playing on fullscreen from a Steam ran game of Valheim. I can press the function keys and they behave the same as outside the game. I can even use F8 to play and pause an active tab on a YouTube video on Firefox(which is pretty cool, even though it's not what I want).

What I've tried. Pressing or holding the Fn key plus pressing function keys doesn't change any behavior. Pressing Fn + Esc does not change behavior. I have also tried CMD+Fn (or Alt + Fn). Same results.
Looked into BIOS and in the 'Advanced' tab there isn't a 'Function Key Behavior'. So I can't mess with that.

Goal(s) Restore keyboard functionality for in-game use. (F2 to bring up game information, and F5 to bring up in-game console for Valheim.)

Limitations. I don't exactly know how to make scripts, but am willing to learn if it remedies this issue. Other solutions are appreciated.


Function keys that work for my setup are:

F8(play/pause)
F10(Mute)
F11(decrease sound)
F12(increase sound)

Keyboard Info
Manufacturer POWZAN
ASIN B08CZFQCKL
Item model number KB770

System:
Kernel: 5.15.0-121-generic x86_64 bits: 64 compiler: gcc v: 11.4.0
Desktop: Cinnamon 5.8.4 Distro: Linux Mint 21.2 Victoria
base: Ubuntu 22.04 jammy
Machine:
Type: Desktop System: Dell product: Inspiron 3847 v: N/A
serial: <superuser required>
Mobo: Dell model: 088DT1 v: A00 serial: <superuser required> UEFI: Dell
v: A02 date: 12/03/2013
Last edited by ZeRager; Feb 15 @ 4:06pm
< >
Showing 1-3 of 3 comments
ZeRager Feb 15 @ 9:27am 
Just discovered that my scroll lock LED doesn't turn on, but the Caps Lock, and Num key illuminate.

I went over to my Windows machine, and the Scroll Lock LED illuminates. So the key, or the LED isn't broken.
ZeRager Feb 15 @ 2:41pm 
I can run the game in windowed mode, and bring up the Virtual Keyboard that Linux Mint offers, and I can successfully press F2. I can also press F12 for screenshots instead of increasing the sound.

However, F5 does not bring up the console. In order to use the virtual keyboard, you have to "pause" Valheim giving you 'Settings, Log Out, Quit, etc.'
Usually when you play any game in 'windowed mode', your mouse will go out of bounds, but apparently they locked the cursor inside the window. So I can't have the game running, and use the virtual keyboard at the same time, but I can use it to press 'some' of the function keys. I'm guessing you can't be paused to access the console window in game.

Just to note, I do have the -console inside the box Properties>General box in launch options for the game. You need this in order to access the console in game. This works on my Windows machine. Does Linux require a different command in that launch box?
ZeRager Feb 15 @ 3:53pm 
Not 'The' solution, but 'A' solution

I have enacted the help of a program called 'Input-Remapper' authored by sezanzeb.
You can download the .deb from this link https://github.com/sezanzeb/input-remap ... /tag/2.1.0 or you can install it from the Software Manager.

You click a device you want to remap, create a preset so you can switch whenever you are playing different games, or running different programs. Then you can 'Add' a button on the Input tab, hit 'Record' and press the key you want to manipulate. Then on the Output tab, establish your new remap. I wrote Key_F2. I did the same thing with F5, and F12. All buttons work the same as on Windows.

Even though I still don't know what's wrong. I am happy with this solution.
Last edited by ZeRager; Feb 15 @ 4:05pm
< >
Showing 1-3 of 3 comments
Per page: 1530 50