From owner-freebsd-questions@FreeBSD.ORG Wed May 21 07:35:51 2003 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 87D9D37B401 for ; Wed, 21 May 2003 07:35:51 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA58943FBD for ; Wed, 21 May 2003 07:35:50 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h4LEZo2c041089; Wed, 21 May 2003 09:35:50 -0500 (CDT) (envelope-from dan) Date: Wed, 21 May 2003 09:35:49 -0500 From: Dan Nelson To: Fabian Haidekker Message-ID: <20030521143549.GE26422@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.1-BETA X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: freebsd-questions@freebsd.org Subject: Re: Shell scripts with Fn 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: Wed, 21 May 2003 14:35:51 -0000 X-List-Received-Date: Wed, 21 May 2003 14:35:51 -0000 In the last episode (May 21), Fabian Haidekker said: > I wonder if I can execute self-written shell scripts by pressing one > of the Fn keys? I am using Freebsd 5 and know how to change > characters on my keymap, but need some help putting shell commands at > certain keys if possible... Depends on where you want the change. You can remap the F-keys with kbdcontrol, but they will not be useable as regular function keys in any program anymore. If your shell supports keybindings, you can bind whatever you want to the F-keys in the shell, which won't affect other programs. Under zsh, for example, this makes the F1 key run the command 'ls -ltr': bindkey -s $termcap[k1] "ls -ltr^m" Under /bin/sh, the syntax is similar, but you'll need to know the key's escape code: bind -s "\e[M" "ls -ltr^m" -- Dan Nelson dnelson@allantgroup.com