1.1k views
in Platform Packages by
Hi,

we are using emwi on a linux target, with openGL and wayland.
On our platform we have a capacitiv button keyboard with the matching driver.
We are able to get the "keyboard" event under linux.
On the platform package we received, it seems there is no integration of the keyboard (except the console).
What is the best way to integrate it (device driver?, patch in ewmain.c ?)

Thanks in advance for your help.

Regards

Laurent

1 Answer

0 votes
by

Hello Laurent,

in case of a keyboard (for which you already have a Linux driver) let me recommend to use keyboard events. Just remove the interface to the console window and use your own keyboard driver within ewmain.c. The advantage of this approach is, that you can use regular keyboard events within your GUI application - which makes it very easy and comfortable to develop and test your GUI application within the Prototyper.

The concept of Device Interface should be used for all other interfaces and protocols except keyboard and touch input.

I hope this helps.

Best regards,

Manfred

by
Hi Manfred,

thank you for your answer.

it is the solution i had used in a first time, but in fact we wanted to try to avoid modifying the tara package

 

Best Regards

Laurent
by
Another question,

is there a way to get key mapping automatically, or is it necessary to implement if like this:

switch ( key)
    {
      case 158 : EwPrint("Key 'Back' pressed\n");  return CoreKeyCodeExit;
      case 103 : EwPrint("Key 'Up' pressed\n");    return CoreKeyCodeUp;

......

 

Best regards

Laurent
by

Hi Laurent,

there is no automatic mapping between (any) keyboard and particular key events.

You can implement this according your keyboard layout and application requirements.

Maybe you can have a look into the file ewapp.c that you will find within your Embedded Wizard installation folder within the subdirectory \Program Files (x86)\Embedded Wizard <version>\Platforms\Tara\Win32\RTE - there you will find a mapping of key codes to key events within a Win32 application.

I think this helps as starting point for your mapping.

Best regards,

Manfred.

by
thank you for your answers

 

Best regards

Laurent

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...