[vtkusers] which keycode has a cursor-key ?

Song Ho Ahn song.ahn at sheridanc.on.ca
Tue Nov 5 14:04:49 EST 2002


Soteffen,
Sorry, there is no key value for arrows in ASCII.
I was wrong. Arrow keys are non-Ascii.

If you are in Win32, use the pre-defined const,VK_LEFT, VK_RIGHT, VK_UP,
VK_DOWN.

Sorry Steffen.
==song==

Song Ho Ahn wrote:
> 
> Hi Seffen,
> Have you try assign keycode value with a specific number, for example;
> char keycode = 28; // or 0x1C in Hex (RIGHT ARROW)
> 
> Also you might try the following functions rather than OnChar().
> void OnKeyDown();
> void OnKeyUp();
> void OnKeyPress();
> void OnKeyRelease();
> 
> ==song==
> 
> Steffen Oeltze wrote:
> >
> > Song Ho Ahn wrote:
> >
> > > Hi Steffen,
> > > Try ASCII codes for arrows;
> > > 28: right arrow
> > > 29: left arrow
> > > 30: up arrow
> > > 31: down arrow
> > >
> > Thanks a lot. Do you know how to convert this into the "char keycode"
> > implemented in :
> >
> > virtual void  OnChar (int ctrl, int shift, char keycode, int
> > repeatcount)
> >
> > of vtkInteractorStyle ?
> >
> > > Note that these are all decimal numbers.
> > > ==song==
> > > Steffen Oeltze wrote:
> > >
> > >> Hi,
> > >> I would like to assign an event to each arrow key (left, right,
> > >> up, down)
> > >> but I don't know their keycodes. Can somebody help me please.
> > >> Steffen
> > >> _______________________________________________
> > >> This is the private VTK discussion list.
> > >> Please keep messages on-topic. Check the FAQ at:
> > >> <http://public.kitware.com/cgi-bin/vtkfaq>
> > >> Follow this link to subscribe/unsubscribe:
> > >> http://public.kitware.com/mailman/listinfo/vtkusers
> > >>
> 
> --
> ______________________________________________________
> Song Ho Ahn                   song.ahn at sheridanc.on.ca
> Visualization Researcher/Developer
> Visualization Design Institute        Sheridan College
> Tel: 905.845.9430 ext 8703         1430 Trafalgar Road
> Fax: 905.815.4220                Oakville, ON, L6H 2L1
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

-- 
______________________________________________________
Song Ho Ahn                   song.ahn at sheridanc.on.ca
Visualization Researcher/Developer
Visualization Design Institute        Sheridan College
Tel: 905.845.9430 ext 8703         1430 Trafalgar Road
Fax: 905.815.4220                Oakville, ON, L6H 2L1



More information about the vtkusers mailing list