Closed offwork closed 7 years ago
You're right, we have no documentation for this. A custom layout can be provided by extending the existing config in your app module:
import {MdKeyboardModule, MD_KEYBOARD_LAYOUTS, IKeyboardLayouts, keyboardLayouts} from '@ngx-material-keyboard/core';
const customKeyboardLayouts: IKeyboardLayouts = keyboardLayouts;
customKeyboardLayouts.numpad = {
'name': 'Numpad', 'keys': [
[['1', '1'], ['2', '2'], ['3', '3']],
[['4', '4'], ['5', '5'], ['6', '6']],
[['7', '7'], ['8', '8'], ['9', '9']],
[['Bksp', 'Bksp'], ['0', '0'], ['Enter', 'Enter']]
]
};
@NgModule({
imports: [
MdKeyboardModule
],
providers: [
{ provide: MD_KEYBOARD_LAYOUTS, useValue: customKeyboardLayouts }
]
})
export class AppModule {}
Have a look at this Plunker.
thanks for your quick reply
How do I make the NumPad appears only on the keyboard layout?