From fdc3c84b5be61b1aeadf02ba30c4ef632f107205 Mon Sep 17 00:00:00 2001 From: Aleksandr Rybalko Date: Wed, 18 Dec 2013 00:14:58 +0000 Subject: [PATCH] Skip processing of R.Alt as a second Alt key, if sysctl kern.vt.enable_altgr is not zero. Submitted by: andreast Sponsored by: The FreeBSD Foundation --- sys/dev/vt/vt_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 95bc531cf70c..8cb2a5e66c21 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -113,6 +113,7 @@ const struct terminal_class vt_termclass = { int sc_txtmouse_no_retrace_wait; static SYSCTL_NODE(_kern, OID_AUTO, vt, CTLFLAG_RD, 0, "Newcons parameters"); +VT_SYSCTL_INT(enable_altgr, 0, "Enable AltGr key (Do not assume R.Alt as Alt)"); VT_SYSCTL_INT(debug, 0, "Newcons debug level"); VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); @@ -404,6 +405,8 @@ vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c) if (c & RELKEY) { switch (c & ~RELKEY) { case (SPCLKEY | RALT): + if (vt_enable_altgr != 0) + break; case (SPCLKEY | LALT): vd->vd_kbstate &= ~ALKED; }