Page MenuHomeFreeBSD

support for function keys for vt(4)
Needs ReviewPublic

Authored by arshankhanifar_gmail.com on Apr 2 2018, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 21, 10:09 AM
Unknown Object (File)
Mon, Jan 19, 2:07 AM
Unknown Object (File)
Jan 2 2026, 6:29 AM
Unknown Object (File)
Dec 9 2025, 11:28 PM
Unknown Object (File)
Nov 28 2025, 12:52 PM
Unknown Object (File)
Nov 19 2025, 6:05 PM
Unknown Object (File)
Nov 18 2025, 1:51 AM
Unknown Object (File)
Nov 17 2025, 12:51 AM
Subscribers

Details

Reviewers
emaste
Summary

This is a proposed fix to this issue:

According to kbdcontrol(1)'s documentation, kbdcontrol(1) can be used to set function key strings for vt(4) and sc(4) console drivers. However, it seems that this hasn't been supported by the vt(4) driver, as function keys result in a call to terminal_input_special which gets teken's defined sequence to send for the function keys.

In this patch, vt(4) will behave the same as before if no function key is set using kbdcontrol(1), and it will send the function key's string if it has been set.

Test Plan
  1. log into any of the ttyv(1) to ttyv(8) terminals.
  2. kbdcontrol -f 1 'hi'
  3. press F1 key
  4. keyboard must have sent the hi text.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped