Re: What is the key nameing of...

2006-09-21 Thread Meino Christian Cramer
From: "Yegappan Lakshmanan" <[EMAIL PROTECTED]>
Subject: Re: What is the key nameing of...
Date: Thu, 21 Sep 2006 10:23:22 -0700

> Hello,
> 
> On 9/21/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:
> > From: "A.J.Mechelynck" <[EMAIL PROTECTED]>
> > Subject: Re: What is the key nameing of...
> > Date: Thu, 21 Sep 2006 18:02:19 +0200
> >
> > > Meino Christian Cramer wrote:
> > > > Hi,
> > > >
> > > >  I often have the problem to guess, how a certain keysequence is named
> > > >  by the syntax of the vim scripting language.
> > > >
> > > >  Recently I tried to map Control-CursorUp but it simply does not work
> > > >  for me.
> > > >
> > > >  Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
> > > >  keysequence" to display the <"key"> thingy?
> > > >
> > > >  Something like (example!)  :
> > > >
> > > >  :showkey
> > > >
> > > >  will display
> > > >
> > > >  :press key
> > > >
> > > >  then one presses the key in question (for example Alt plus F11...)
> > > >  and then it displays:
> > > >
> > > >  :
> > > >
> > > >  ...
> > > >
> > > >  (an example only just to get around my limitied "power of
> > > >  explanation"... ;O)
> > > >
> > > >  
> > > >
> > >
> > > Ctrl + CursorUp is  in a mapping
> > > Alt + F11 is  or 
> > >
> > > In the GUI but not in console Vim, you can find the value by hitting the
> > > key preceded by Ctrl-V (or Ctrl-Q if you use Ctrl-V to paste) in either
> > > Insert/Replace or Command-line modes
> > >
> > > In the GUI and also in console Vim, you can find the value by hitting
> > > the special key or key combo preceded by Ctrl-K in either Insert/Replace
> > > or Command-line modes.
> > >
> > > I don't know whether this second method also applies in "tiny" or
> > > "small" versions of Vim (which lack the +digraphs feature); but these
> > > versions also lack expression evaluation, so I personally give them a
> > > wide berth.
> > >
> >
> >  thanks for your explanations ! :)
> >
> >  Ctrl-v gives me the "raw values" (that is the binary representation)
> >  of the keycodes. But I wanted the way of "name" those keysequences
> >  when using in vim scripts displayed.
> >
> 
> As explained under ":help i_CTRL-K", you can get the keycodes for
> special keys by pressing CTRL-K followed by the key in insert
> mode.
> 
> - Yegappan
> 

Hi Yegappan ! 

 Exactly what I have searched for! Thanks a lot!

 Keep hacking!
 mcc



Re: What is the key nameing of...

2006-09-21 Thread Yegappan Lakshmanan

Hello,

On 9/21/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:

From: "A.J.Mechelynck" <[EMAIL PROTECTED]>
Subject: Re: What is the key nameing of...
Date: Thu, 21 Sep 2006 18:02:19 +0200

> Meino Christian Cramer wrote:
> > Hi,
> >
> >  I often have the problem to guess, how a certain keysequence is named
> >  by the syntax of the vim scripting language.
> >
> >  Recently I tried to map Control-CursorUp but it simply does not work
> >  for me.
> >
> >  Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
> >  keysequence" to display the <"key"> thingy?
> >
> >  Something like (example!)  :
> >
> >  :showkey
> >
> >  will display
> >
> >  :press key
> >
> >  then one presses the key in question (for example Alt plus F11...)
> >  and then it displays:
> >
> >  :
> >
> >  ...
> >
> >  (an example only just to get around my limitied "power of
> >  explanation"... ;O)
> >
> >  
> >
>
> Ctrl + CursorUp is  in a mapping
> Alt + F11 is  or 
>
> In the GUI but not in console Vim, you can find the value by hitting the
> key preceded by Ctrl-V (or Ctrl-Q if you use Ctrl-V to paste) in either
> Insert/Replace or Command-line modes
>
> In the GUI and also in console Vim, you can find the value by hitting
> the special key or key combo preceded by Ctrl-K in either Insert/Replace
> or Command-line modes.
>
> I don't know whether this second method also applies in "tiny" or
> "small" versions of Vim (which lack the +digraphs feature); but these
> versions also lack expression evaluation, so I personally give them a
> wide berth.
>

 thanks for your explanations ! :)

 Ctrl-v gives me the "raw values" (that is the binary representation)
 of the keycodes. But I wanted the way of "name" those keysequences
 when using in vim scripts displayed.



As explained under ":help i_CTRL-K", you can get the keycodes for
special keys by pressing CTRL-K followed by the key in insert
mode.

- Yegappan


Re: What is the key nameing of...

2006-09-21 Thread A.J.Mechelynck

Meino Christian Cramer wrote:
[...]

Hi Tony,

 thanks for your explanations ! :)

 Ctrl-v gives me the "raw values" (that is the binary representation)
 of the keycodes. But I wanted the way of "name" those keysequences
 when using in vim scripts displayed.

 Keep hacking!
 mcc


Yes, that's what I said. Let's say you hit (in Insert mode) Ctrl-V 
followed by F1.


In gvim, you get  (less-than, eff, one, greater-than). In console 
Vim, it depends on the terminal. I get ^[OP (Control-left-bracket oh 
pee) in konsole and ^[[[A (control-left-bracket left-bracket 
left-bracket aye) in /dev/tty (the pure-text non-X terminal). [All this 
with a single executable which can run as a Gnome2 GUI or as a console 
utility on Linux.]


When I hit (still in Insert mode) Ctrl-K and then F1, I get  in all 
three.



Best regards,
Tony.




Re: What is the key nameing of...

2006-09-21 Thread Meino Christian Cramer
From: "A.J.Mechelynck" <[EMAIL PROTECTED]>
Subject: Re: What is the key nameing of...
Date: Thu, 21 Sep 2006 18:02:19 +0200

> Meino Christian Cramer wrote:
> > Hi,
> > 
> >  I often have the problem to guess, how a certain keysequence is named
> >  by the syntax of the vim scripting language.
> > 
> >  Recently I tried to map Control-CursorUp but it simply does not work
> >  for me.
> > 
> >  Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
> >  keysequence" to display the <"key"> thingy?
> > 
> >  Something like (example!)  : 
> > 
> >  :showkey
> > 
> >  will display
> > 
> >  :press key
> > 
> >  then one presses the key in question (for example Alt plus F11...)
> >  and then it displays:
> > 
> >  :
> > 
> >  ...
> > 
> >  (an example only just to get around my limitied "power of
> >  explanation"... ;O)
> > 
> >  
> > 
> >  Keep hacking!
> >  mcc
> > 
> >  
> > 
> 
> Ctrl + CursorUp is  in a mapping
> Alt + F11 is  or 
> 
> In the GUI but not in console Vim, you can find the value by hitting the 
> key preceded by Ctrl-V (or Ctrl-Q if you use Ctrl-V to paste) in either 
> Insert/Replace or Command-line modes
> 
> In the GUI and also in console Vim, you can find the value by hitting 
> the special key or key combo preceded by Ctrl-K in either Insert/Replace 
> or Command-line modes.
> 
> I don't know whether this second method also applies in "tiny" or 
> "small" versions of Vim (which lack the +digraphs feature); but these 
> versions also lack expression evaluation, so I personally give them a 
> wide berth.
> 
> 
> Best regards,
> Tony.
> 

Hi Tony,

 thanks for your explanations ! :)

 Ctrl-v gives me the "raw values" (that is the binary representation)
 of the keycodes. But I wanted the way of "name" those keysequences
 when using in vim scripts displayed.

 Keep hacking!
 mcc
 

 
 
 


Re: What is the key nameing of...

2006-09-21 Thread A.J.Mechelynck

Meino Christian Cramer wrote:

Hi,

 I often have the problem to guess, how a certain keysequence is named
 by the syntax of the vim scripting language.

 Recently I tried to map Control-CursorUp but it simply does not work
 for me.

 Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
 keysequence" to display the <"key"> thingy?

 Something like (example!)  : 


 :showkey

 will display

 :press key

 then one presses the key in question (for example Alt plus F11...)
 and then it displays:

 :

 ...

 (an example only just to get around my limitied "power of
 explanation"... ;O)

 

 Keep hacking!
 mcc

 



Ctrl + CursorUp is  in a mapping
Alt + F11 is  or 

In the GUI but not in console Vim, you can find the value by hitting the 
key preceded by Ctrl-V (or Ctrl-Q if you use Ctrl-V to paste) in either 
Insert/Replace or Command-line modes


In the GUI and also in console Vim, you can find the value by hitting 
the special key or key combo preceded by Ctrl-K in either Insert/Replace 
or Command-line modes.


I don't know whether this second method also applies in "tiny" or 
"small" versions of Vim (which lack the +digraphs feature); but these 
versions also lack expression evaluation, so I personally give them a 
wide berth.



Best regards,
Tony.


Re: What is the key nameing of...

2006-09-21 Thread Dmitriy Yamkovoy

Ctrl-V does exactly this.  You can go into insert mode, then hit C-V,
Ctrl+Up and it will display:



You can :help keycodes to see a list of others.

On 9/21/06, Meino Christian Cramer <[EMAIL PROTECTED]> wrote:

Hi,

 I often have the problem to guess, how a certain keysequence is named
 by the syntax of the vim scripting language.

 Recently I tried to map Control-CursorUp but it simply does not work
 for me.

 Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
 keysequence" to display the <"key"> thingy?

 Something like (example!)  :

 :showkey

 will display

 :press key

 then one presses the key in question (for example Alt plus F11...)
 and then it displays:

 :

 ...

 (an example only just to get around my limitied "power of
 explanation"... ;O)

 

 Keep hacking!
 mcc





Re: What is the key nameing of...

2006-09-21 Thread Jürgen Krämer

Hi,

Meino Christian Cramer wrote:
> 
>  I often have the problem to guess, how a certain keysequence is named
>  by the syntax of the vim scripting language.
> 
>  Recently I tried to map Control-CursorUp but it simply does not work
>  for me.
> 
>  Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
>  keysequence" to display the <"key"> thingy?

have you tried Ctrl-V + Control-CursorUp while in insert or command mode?
For me, Vim shows

  

>  Something like (example!)  : 
> 
>  :showkey
> 
>  will display
> 
>  :press key
> 
>  then one presses the key in question (for example Alt plus F11...)
>  and then it displays:
> 
>  :

Now that would be a really strange answer for your example. ;-)

There also is a list with some/all special key codes. Have a look at

  :help key-codes

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)



What is the key nameing of...

2006-09-21 Thread Meino Christian Cramer
Hi,

 I often have the problem to guess, how a certain keysequence is named
 by the syntax of the vim scripting language.

 Recently I tried to map Control-CursorUp but it simply does not work
 for me.

 Is there any function/script/hack/trick/* like Ctrl-v is for the "raw
 keysequence" to display the <"key"> thingy?

 Something like (example!)  : 

 :showkey

 will display

 :press key

 then one presses the key in question (for example Alt plus F11...)
 and then it displays:

 :

 ...

 (an example only just to get around my limitied "power of
 explanation"... ;O)

 

 Keep hacking!
 mcc