You are not logged in.

#1 2025-10-23 05:54:48

zazke
Member
Registered: 2023-03-25
Posts: 2
Website

[SOLVED] F1-F5 buttons don't work in TTY

F-keys work fine on graphical interface (X11) but only F1-F5 refuse to work on TTY right after login (before X11).  On the shell F1-5 produce nothing, but on neovim insert mode, they produce A-E (F1 puts A, F5 puts E).

I've had this issue for quite a while on my daily driver laptop.  I've been able to ignore the issue for a while because I start X right away after login.  But today I decided to address the issue.

There is a similar post, but the issue there was with wrong keymap.  Which is not the case for here.

Offline

#2 2025-10-23 06:05:14

zazke
Member
Registered: 2023-03-25
Posts: 2
Website

Re: [SOLVED] F1-F5 buttons don't work in TTY

Changing $TERM from "xterm-256color" to "linux" fixed the issue.

I've had "export TERM=xterm-256color" in my .bashrc because it fixed some other issues while connecting via ssh to AWS EC2 running debian using the suckless "st" terminal which changes TERM to "st-256color".  I've removed that line and will create a tiny scrip to set it up only it's needed.

The steps to figure out the problem where:

1. Check keymap (sudo loadkeys us; dumpkeys) (not the issue)
2. Check hardware (sudo showkey) (not the issue)
3. Check how the terminal (Linux TTY) interprets the key (startup script might be trapping F-keys or setting up a weird $TERM) which was indeed the case for me.

I'm leaving this information here in case anyone finds it useful.

Offline

Board footer

Powered by FluxBB