From owner-freebsd-questions@freebsd.org Mon Nov 6 02:01:06 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 648F8E575CE for ; Mon, 6 Nov 2017 02:01:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E11C37453C for ; Mon, 6 Nov 2017 02:01:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Mon, 06 Nov 2017 03:00:05 +0100 Received: from r56.edvax.de (port-92-195-23-159.dynamic.qsc.de [92.195.23.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 58A3F3CBF9; Mon, 6 Nov 2017 02:59:59 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id vA61xxv3007453; Mon, 6 Nov 2017 02:59:59 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 6 Nov 2017 02:59:59 +0100 From: Polytropon To: "J.B." Cc: freebsd-questions@freebsd.org Subject: Re: freebsd-questions Digest, Vol 700, Issue 6 Message-Id: <20171106025959.231c2772.freebsd@edvax.de> In-Reply-To: <977cc6e1-219b-8213-4790-1f28cbaebb67@gmail.com> References: <977cc6e1-219b-8213-4790-1f28cbaebb67@gmail.com> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with A3090683622 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:1.003 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2017 02:01:06 -0000 On Sun, 5 Nov 2017 17:16:38 -0800, J.B. wrote: > > > > Message: 4 Date: Fri, 3 Nov 2017 10:44:04 -0700 From: "J.B." > > To: freebsd-questions@freebsd.org > > Subject: VT_ALT_TO_ESC_HACK for sc (syscons) Message-ID: > > <184bbd63-e635-1d52-19a6-3e9c1a414e40@gmail.com> Content-Type: > > text/plain; charset=utf-8; format=flowed FreeBSD 11.1-RELEASE is using > > vt as the default console driver, and it contains a hack which maps an > > ESC sequence to the Alt key on your keyboard. FreeBSD 10.3-RELEASE > > uses sc as the default driver, and the Alt keys don't register a > > keystroke for most cases. On vt, Alt-b, Alt-f, Alt-Backspace, etc., > > behave as they do when logged in over SSH using a bash shell (with its > > default emacs bindings): move the cursor backwards one word, forwards > > one word, delete word to the right of the cursor, etc. How can that > > effect be replicated on sc? I tried a new keymap using kbdcontrol, but > > there's no way to map key combinations onto the alt-b, alt-f, alt-bs, > > etc., sequences -- the mapfile only allows for single keystrokes. I > > know I can set vt as the console driver on 10.3-RELEASE, but the font > > in vt is so ugly I want to gouge other peoples' eyes out to save them > > from the horrors of seeing it. Adjusting the screen resolution only > > helped a tiny bit -- not enough to save peoples' eyes from my angry > > fingers. Tried the sample fonts inside /usr/share/vt/fonts/ already. > Nobody knows how to implement that hack or replicate its effect on sc? As far as I know, sc does not support this kind of capturing key events. A notable exception is Alt+PF1, Alt+PF2 and so on for switching the virtual terminals which is "handled interally" (by the console driver itself) and won't be available to text mode programs. Maybe /usr/src/sys/dev/syscons/syscons.c reveals the magic, which probably involves ioctl()... > Then what about getting vt's display to look like sc? Not possible, as it seems. This has been discussed recently. There are too many "moving parts" within vt and in the surrounding tools. Essentially, text mode is dead. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...