Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: research.localnet: nobody set sender to jbd AT codemeta DOT com using -f To: "Lee D. Rothstein" Subject: Re: remapping Cygwin 'bash' readline functions to PC keys Message-ID: <1045763559.3e5515e7ece34@www.milessmithfarm.net> Date: Thu, 20 Feb 2003 12:52:39 -0500 From: Cc: john mapoles , References: <5 DOT 2 DOT 0 DOT 9 DOT 0 DOT 20030218185859 DOT 103df640 AT rogue DOT codemeta DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 0 DOT 20030219135548 DOT 00aac350 AT rogue DOT codemeta DOT com> In-Reply-To: <5.2.0.9.0.20030219135548.00aac350@rogue.codemeta.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.0-pre12 X-Originating-IP: 65.211.103.2 Cavaet for non-cygwin users: Keep in mind that the C-V will only work with ANSI escape sequences (which Cygwin produces in its "command line" windows. C-V will not work for all terminals (or their emulators) - especially VT52, Hazeltine, ... Most MS-Windows users can ignore the above warning. --Bruce PS: 'od -c' merely outputs the "character" equivalents of its input. So, pressing the Home key, followed by C-d (control-d) after entering the 'od -c' command will result in something like: 0000000 033 [ 1 ~ \n Telling you that "Escape" (033) "[" "1" "~" "newline" was entered. But you probably already knew that. Quoting "Lee D. Rothstein" : > John, thanks for the heads up! Others had > suggested, variations of 'cat < foo' and 'od -c'. (The > former I got to work, the latter remains a mystery.) > Your solution, besides being the most straight-forward, > is also a great tool to have around. Apparently, it's a > feature of Cygwin, or 'bash', since it doesn't work in > a naked 'cmd.exe' window. I'll be sure to add it to my > documentation. > > Unfortunately the key combos I'm trying to map to > are: <^-->> and <^-<-> (control- and the right and left > arrow keys). It turns out that the character string > outputs for both the: > > * naked key > * shift - and the naked key > * control- and the naked key > > are all the same. > > Actually, I no longer consider these to be KIDs; these > are the character string graphemic outputs of hitting > the key. I'll continue to reserve "KIDs" for when one > represents these [and the key isomorphisms] > with '/e...', 'C-...', etc. "notation". > > Apparently (?), the only way to discriminate among these > three alternatives is with Scan Codes. Apparently, all > the -x-ish stuff I've used (Microemacs, Thompson shell > command line editing) that can discriminate among the > three alternatives all use Scan Codes (?). > > - Any way to map to Scan Codes to 'bash' 'readline' > functions under Cygwin? > + Or to key "names" like: '', > '' > - Any interest among Cygwin developers in adding > this? > > >At 2003-02-19 08:02 AM -0800, John Mapole wrote: > ... > >You can build your own KID table. Once at the cygwin > >prompt you can type , that's control-V, followed > >by the key. On my machine, if I type , I > >see "^[[2~". This is the same as "\e[2~". > > > >Why these mapping are like this relates to how windows > >maps them and then how cygwin maps them. Something I > >am now very clear on. > > > >Hope this helps some. > > > >John Mapoles > > > >--- "Lee D. Rothstein" wrote: > ... > >> Q1 -- When you remap a 'bash' Edit Mode function in > >> .inputrc, it looks like this: > >> > >> "\e[3~": delete-char # DEL key > >> > >> The entity in double quotes ("\e[3~"), I'm calling > >> the "key ID (KID)". In the above '.inputrc' declaration, > >> the function 'delete-char' being remapped from its > >> default key assignment to the KID -- "\e[3~" -- the > >> key. > >> > >> What are the KIDs of the following IBM PC keys > >> (specified below with facsimiles of the key caps > >> contained in angle brackets -- '<...>')? > >> > >> Cursor control key pad > >> ---------------------- > >> > >> > >> > >> > >> > >> > >> > >> > >> Numeric pad > >> ----------- > >> <-> > >> <+> > >> > >> > > I should have included in the above lists, all variations > of the above with the control, alt and shift keys. > > >> In general, I'd like a table that maps the KIDs for all > >> 104 keys on the keyboard I use. Or, better still, is > >> there a way to use scan codes? > >> > >> (Incidentally, what makes finding a table of these > >> KIDs so difficult is the failure of the documentation > >> to assign this concept a unique, or even a consistent > >> word.) > >> > >> Q2 > >> -- > >> > >> Is there a way to make the key a toggle > >> between the insert and overwrite modes of 'bash' > >> edit mode? > >> > >> I used to have these figured out for 'Microemacs', > >> but that was half a lifetime ago, for me, & Microemacs > >> supported scan codes, if I remember correctly. > > -- > Lee D. Rothstein -- lee AT veritech DOT com > VeriTech -- 603-424-2900 > 7 Merry Meeting Drive > Merrimack, NH 03054-2934 > ------------------------------------------------- This mail sent through IMP: www.milessmithfarm.net -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/