2013/11/9 MinnesotaJon <nicho...@acegroup.cc>

> ......
> Wamukota wrote
> > The value for the key.enter constant in the 3.5.0 on my box is given as
> > 16777221
> >
> > ? key.enter
> > 16777221
> >
> > But, the value returned by key.code in the program is 16777220 in the
> > keyrelease or the keypress events which implies that I cannot check if
> the
> > key pressed is the Enter/Return key using the constants.
> > As a workaround I switched to checking for the number or the key.enter
> > value as valid values,  but I know that is not the way to go....
> >
> > Bug?
>
> Alain --
>
> The Enter key and the Return key are actually 2 different keys!
>
> In my blog post
> "
> http://beginnersguidetogambas.com/2013/02/12/some-useful-gambas-usages-and-examples/
> ",
> I explain:
>
> Note that the “Return” key is the “enter” key near the center of a standard
> desktop PC keyboard, with the “return” symbol.
> The “Enter” key is the “enter” key at the right side of a standard desktop
> PC keyboard, with the numeric keypad.
>
> The keys are equivalent in function, but each one returns a different key
> code.  Here is how you use the constants:
>
> .....
>     If Key.Code = Key.Return Or Key.Code = Key.Enter Then
>         ......
>     Endif
>
>
>
Hoi,

txs for the info.

Why is Enter printed on that key on my laptop ??

I would never have guessed to refer to Key.Return instead of key.Enter.

Alain
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to