From owner-freebsd-questions@FreeBSD.ORG Sat Mar 13 22:19:20 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FC0116A4CE for ; Sat, 13 Mar 2004 22:19:20 -0800 (PST) Received: from pd3mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38C2343D2D for ; Sat, 13 Mar 2004 22:19:20 -0800 (PST) (envelope-from flowers@users.sourceforge.net) Received: from pd4mr3so.prod.shaw.ca (pd4mr3so-qfe3.prod.shaw.ca [10.0.141.214]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HUJ002D3YV8DP@l-daemon> for freebsd-questions@FreeBSD.ORG; Sat, 13 Mar 2004 23:18:44 -0700 (MST) Received: from pn2ml6so.prod.shaw.ca (pn2ml6so-qfe0.prod.shaw.ca [10.0.121.150]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HUJ00JDXYV86X@l-daemon> for freebsd-questions@FreeBSD.ORG; Sat, 13 Mar 2004 23:18:44 -0700 (MST) Received: from sirius (h68-144-47-89.cg.shawcable.net [68.144.47.89]) 2003))freebsd-questions@FreeBSD.ORG; Sat, 13 Mar 2004 23:18:44 -0700 (MST) Date: Sat, 13 Mar 2004 23:18:42 -0700 From: Dan MacMillan To: freebsd-questions@FreeBSD.ORG Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal Subject: kbdcontrol -f and escape sequences X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2004 06:19:20 -0000 Hello, I'm having some trouble using kbdcontrol to redefine function keys to strings that include escape sequences. For example, suppose I want to redefine "F1" to be equivalent to pressing the left arrow key twice in a row. I naiively thought this would work: kbdcontrol -f 1 "\033[D\033[D" However, that just causes the literal string "\033[D\033[D" to be printed verbatim when I press F1. I tried a few variations on this theme but was unsuccessful. I know the architecture allows what I want because I was able to change the source code to kbdcontrol to set the default values of the function keys (in the fkey_table[][] array) to be what I want: /* 01-04 */ "\033[D\033[D","\033[N","\033[O","\033[P", and then cause the values to be defined by running: kbdcontrol -F Clearly, though, that "solution" has no legs. I know (think?) there's got to be a way to do this using the standard kbdcontrol utility, and I'm probably just not escaping my escape sequences properly on the command line, but I'm just not grokking it. - Danny MacMillan