handleKeyPress method
Implementation
@HostListener('keypress')
void handleKeyPress(KeyboardEvent keyEvent) {
int keyCode = keyEvent.keyCode;
if (keyCode == KeyCode.ENTER || isSpaceKey(keyEvent)) {
toggleChecked();
keyEvent.preventDefault();
keyEvent.stopPropagation();
}
}