Bug 212197 - Ctrl+/ is not mapped on vt(4)
Summary: Ctrl+/ is not mapped on vt(4)
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.0-RC1
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Ed Maste
URL:
Keywords: patch, vt
Depends on:
Blocks:
 
Reported: 2016-08-27 14:57 UTC by martin
Modified: 2018-02-08 00:43 UTC (History)
1 user (show)

See Also:
emaste: mfc-stable11+
emaste: mfc-stable10+


Attachments
Make Ctrl+/ work on vt/syscons (702 bytes, patch)
2016-08-28 07:55 UTC, martin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description martin 2016-08-27 14:57:18 UTC
Hi,

I use Ctrl+/ for tmux prefix, because this is one key combo that is rarely used, but usually works everywhere. I noticed, I does not work with vt(4).

Take a look at this:

/usr/share/vt/keymaps/us.kbd:
#                                                         alt
# scan                       cntrl          alt    alt   cntrl lock
# code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
# ------------------------------------------------------------------
  053   '/'    '?'    nop    nop    '/'    '?'    nop    nop     O

It seems that / is not mapped, but it should, to Ctrl+_.

Here are the relevant lines from my ~/.tmux.conf that you can try to reproduce this behavior (this will work in Xorg):

set -g prefix '^_'
bind '^_' send-prefix
unbind C-b

--
Martin
Comment 1 martin 2016-08-28 07:55:57 UTC
Created attachment 174151 [details]
Make Ctrl+/ work on vt/syscons

I attached a patch that would Ctrl+/ work with vt/syscons like it works in Xorg.

It maps Ctrl+/ to 0x1f (^_).

--
Martin
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-01-25 21:14:28 UTC
A commit references this bug:

Author: emaste
Date: Thu Jan 25 21:13:43 UTC 2018
New revision: 328412
URL: https://svnweb.freebsd.org/changeset/base/328412

Log:
  vt: add Ctrl+/ key mapping

  This matches Xorg's handling of Ctrl+/ and may be useful as a tmux
  escape.

  PR:		212197
  Submitted by:	martin at sugioarto.com
  Tested by:	Arshan Khanifar <arshankhanifar_gmail.com>
  MFC after:	2 weeks
  Relnotes:	Yes

Changes:
  head/share/vt/keymaps/us.kbd
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-02-08 00:41:44 UTC
A commit references this bug:

Author: emaste
Date: Thu Feb  8 00:40:56 UTC 2018
New revision: 329005
URL: https://svnweb.freebsd.org/changeset/base/329005

Log:
  MFC r328412: vt: add Ctrl+/ key mapping

  This matches Xorg's handling of Ctrl+/ and may be useful as a tmux
  escape.

  PR:		212197
  Submitted by:	martin at sugioarto.com
  Relnotes:	Yes

Changes:
_U  stable/11/
  stable/11/share/vt/keymaps/us.kbd
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-02-08 00:42:47 UTC
A commit references this bug:

Author: emaste
Date: Thu Feb  8 00:42:03 UTC 2018
New revision: 329006
URL: https://svnweb.freebsd.org/changeset/base/329006

Log:
  MFC r328412: vt: add Ctrl+/ key mapping

  This matches Xorg's handling of Ctrl+/ and may be useful as a tmux
  escape.

  PR:		212197
  Submitted by:	martin at sugioarto.com

Changes:
_U  stable/10/
  stable/10/share/vt/keymaps/us.kbd