ngx-material-keyboard / core

Onscreen virtual keyboard for Angular ≥ 5 (https://angular.io/) using Angular Material (https://material.angular.io/).
https://ngx-material-keyboard.github.io/core/
98 stars 120 forks source link

Add a class name to buttons and remove listen to keypress #77

Closed Dimoshka closed 6 years ago

Dimoshka commented 6 years ago

I'm implementing an application that will be displayed on TVs in the browser. Some TVs do not have their own keyboard and therefore I need to show the screen keyboard. Your project is great for this. But I ran into several problems.

Navigation is controlled by a remote control panel (up, down, right ... ok (enter)).

1) To connect my own navigation by HTML elements, I need to add the name of a specific class for each key in your keyboard. Is it possible to do this programmatically when the keyboard is initialized? This is necessary so that the user can move around the keys using the up, down, right, left.

2) I need to disable the processing of pressing the key in the keyboard - so that I myself can press the soft keys. If you now press Enter on a regular keyboard, then your virtual keyboard will also display this pressing. Therefore, when the user presses the enter button on the remote control, the virtual keyboard will also process the event. This does not allow you to press the selected key with the remote control (I partially implemented the navigation on the keys).

3) Can I programmatically specify in which field it is necessary to enter data from the keyboard? I call the keyboard manually, as needed. I would like to pass the field id in which the keyboard will insert the pressed characters.

Thank you so much. I apologize if the answers are in the documentation and I did not find them.

davidenke commented 6 years ago

Sorry for the late reply. Your use case is very specific. I would recommend to fork this repo and customize to your needs.

E.g. adding custom classes would then be easy, as you can adopt in the KeyboardKeyComponent.