On Wed, 4 Sep 2002, Steven Kurylo wrote:
>
> { 0x0D,   K_FIELDEXIT },   /* Numeric enter */
>
> Yes?
>

Well, not exactly.   You're right in that this would translate the RETURN
character (VK_RETURN = 13 = 0x0d) to be the 5250 FIELD EXIT command.
However, since you're operating on a character message, it will translate
that way for any key sequence that generates a carriage return message.
In other words, BOTH enter keys will now send field-exit.

If you just want the numeric enter key, you need to handle it as a
key-down message, so you need to make your changes in the keydown2msg
array.

to do that, find the section of code that looks like this:

   { 0,          VK_ADD,          K_FIELDPLUS  , 0, 0 },
   { 0,          VK_SUBTRACT,     K_FIELDMINUS , 0, 0 },
   { 0,          VK_SCROLL,       K_HELP       , 0, 0 },
   { -1, -1, -1, -1, -1 },
};

And add a line that maps VK_RETURN to K_FIELDEXIT, but only when the
"ext" (extended keyboard) bit is on, like so:

   { 0,          VK_ADD,          K_FIELDPLUS  , 0, 0 },
   { 0,          VK_SUBTRACT,     K_FIELDMINUS , 0, 0 },
   { 0,          VK_SCROLL,       K_HELP       , 0, 0 },
   { 0,          VK_RETURN,       K_FIELDEXIT  , 0, 1 },  /* ADDED THIS */
   { -1, -1, -1, -1, -1 },
};




_______________________________________________
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: [EMAIL PROTECTED]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/linux5250
or email: [EMAIL PROTECTED]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.

Reply via email to