Skip to content

[question] cdk keycodes #7358

Closed
Closed
@abdel-ships-it

Description

@abdel-ships-it

Whats the idea behind using the keycodes in here ?

I was looking at your implementation of the dialog and have noticed you are using it to for example detect when the user pressed escape.

You do that in a rather interesting way, you add an event listener to the document which executes a method which eventually checks the keycode.

My question is, why did you prefer this approach for handling keydown events instead of using HostListener like this.

@HostListener('document:keydown.Escape', ['$event']) ...

I am fully aware of the fact I should be on Stackoverflow for questions, but this question is related to internal code rather than the usage of it, therefor I thought this would be a better place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions