Alaska Software Inc. - Different INKEY and AppEvent codes for right and left Alt key keystokes
Alaska Software Inc. - Different INKEY and AppEvent codes for right and left Alt key keystokes
Username: Password:
AuthorTopic: Different INKEY and AppEvent codes for right and left Alt key keystokes
Tim CallahanDifferent INKEY and AppEvent codes for right and left Alt key keystokes
on Tue, 24 Jul 2018 17:30:36 -0700
Hi -
I am getting different inkey and event codes if the right or left Alt
key is used for a keystroke. It works fine for function keys but not
for alphas. Moreover it doesn't happen on every machine I test it on.

 Some example results are:

20180724 20:24:37 R AltA INKEY:           97
20180724 20:24:41 L AltA INKEY:           286
20180724 20:24:49 R AltA EVENT:           97
20180724 20:24:53 L AltA EVENT:           327745
20180724 20:24:58 R AltN INKEY:           110
20180724 20:25:02 L AltN INKEY:           305
20180724 20:25:08 R AltN EVENT:           110
20180724 20:25:11 L AltN EVENT:           327758
20180724 20:25:15 R AltZ INKEY:           122
20180724 20:25:19 L AltZ INKEY:           300
20180724 20:25:23 R AltZ EVENT:           122
20180724 20:25:25 L AltZ EVENT:           327770
20180724 20:25:31 R AltF3 INKEY:          -32
20180724 20:25:34 L AltF3 INKEY:          -32
20180724 20:25:38 R AltF3 EVENT:          327794
20180724 20:25:42 L AltF3 EVENT:          327794

Has anyone experienced this?

Thanks,
Tim
Jim LeeRe: Different INKEY and AppEvent codes for right and left Alt key keystokes
on Wed, 25 Jul 2018 21:28:15 +0200
hi,

> I am getting different inkey and event codes if the right or left Alt
> key is used for a keystroke.

i have no right ALT Key ... i have ALT  GR = CRTL-ALT
also Inkey() does not have CRTL-ALT

so look into INKEY.CH and APPEVENT.CH to see difference
Tim CallahanRe: Different INKEY and AppEvent codes for right and left Alt key keystokes
on Wed, 25 Jul 2018 14:39:03 -0700
Thansk for the input.
I have a centralized function that handles keystrokes in a converted
clipper app.
It converts xbase keypress events to clipper key codes to retain
compatiblity with the original functionality.
I think I need to add these additional events (getting two different
ones for right and left alt keys with alpha characters) to the
event->inkey mappings.
But this is wierd behavior and does not occur on all machines so
wondering if it is a hardware issue or something.
All of  our keyboards have two alt keys positioned to the right and
left of the spacebar.

On Wed, 25 Jul 2018 21:28:15 +0200, Jim Lee wrote:

>hi,
>
>> I am getting different inkey and event codes if the right or left Alt
>> key is used for a keystroke.
>
>i have no right ALT Key ... i have ALT  GR = CRTL-ALT
>also Inkey() does not have CRTL-ALT
>
>so look into INKEY.CH and APPEVENT.CH to see difference
>
Tim CallahanRe: Different INKEY and AppEvent codes for right and left Alt key keystokes
on Wed, 25 Jul 2018 16:23:57 -0700
After further analysis the right alt key + alpha is returning the
ascii code for the alpha character from AppEvent(). The left alt key +
alpha returns the proper xbeK_xxx event code for the alt key
combination. This is only an issue with alpha alt key combinations and
not alt function key combos. 

 I''ve opened a ticket with Alaska support and will post any results
here.

On Tue, 24 Jul 2018 17:30:36 -0700, Tim Callahan wrote:

>Hi -
>I am getting different inkey and event codes if the right or left Alt
>key is used for a keystroke. It works fine for function keys but not
>for alphas. Moreover it doesn't happen on every machine I test it on.
>
> Some example results are:
>
>20180724 20:24:37 R AltA INKEY:           97
>20180724 20:24:41 L AltA INKEY:           286
>20180724 20:24:49 R AltA EVENT:           97
>20180724 20:24:53 L AltA EVENT:           327745
>20180724 20:24:58 R AltN INKEY:           110
>20180724 20:25:02 L AltN INKEY:           305
>20180724 20:25:08 R AltN EVENT:           110
>20180724 20:25:11 L AltN EVENT:           327758
>20180724 20:25:15 R AltZ INKEY:           122
>20180724 20:25:19 L AltZ INKEY:           300
>20180724 20:25:23 R AltZ EVENT:           122
>20180724 20:25:25 L AltZ EVENT:           327770
>20180724 20:25:31 R AltF3 INKEY:          -32
>20180724 20:25:34 L AltF3 INKEY:          -32
>20180724 20:25:38 R AltF3 EVENT:          327794
>20180724 20:25:42 L AltF3 EVENT:          327794
>
>Has anyone experienced this?
>
>Thanks,
>Tim