I'm not a programmer, I'm just learning. I'm trying to learn javascript using GJS and GNOME-Shell-extensions as examples. I'm trying to build an extension it has a ModalDialog with a Close button. from the button everything is closed without problems, but I want to add the ability to close it with the Escape key. in the code I have a signal handler like this
this.connect('key-press-event', () => {
but at least kill me, I do not understand how to handle this signal. I saw several similar questions here, and I tried the answer options in different ways, but I have either an error or an undefined one, help me, my head explodes. please explain to me how I need to work with 'key-press-event'.
https://stackoverflow.com/questions/67238908/gnome-shell-how-to-close-modaldialog-with-escape-key April 24, 2021 at 10:50AM
没有评论:
发表评论