From 0dd08b1b984cff92890629ceb3d8a61a88ee2f4c Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 5 Jun 2015 23:25:51 +0200 Subject: [PATCH] kernel/syscons: Hack around some issues between console cut/paste and Xorg. It led to repeating characters (as if typed) when cutting/pasting in Xorg. Reported-by: profmakx, jh32, ryuo, and others Submitted-by: dillon --- sys/dev/misc/syscons/syscons.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/misc/syscons/syscons.c b/sys/dev/misc/syscons/syscons.c index 0065e5bafb..2c0d40024a 100644 --- a/sys/dev/misc/syscons/syscons.c +++ b/sys/dev/misc/syscons/syscons.c @@ -3805,6 +3805,13 @@ sc_paste(scr_stat *scp, u_char *p, int count) struct tty *tp; u_char *rmap; + /* + * Holy hell, don't try to inject a paste buffer if the keyboard + * is not in ascii mode! + */ + if (scp->kbd_mode != K_XLATE) + return; + lwkt_gettoken(&tty_token); if (scp->status & MOUSE_VISIBLE) { tp = VIRTUAL_TTY(scp->sc, scp->sc->cur_scp->index); -- 2.41.0