oxen-io / session-desktop

Session Desktop - Onion routing based messenger
https://getsession.org
GNU General Public License v3.0
1.43k stars 186 forks source link

Add keyboard shortcuts to modals #2977

Closed KeeJef closed 3 months ago

KeeJef commented 7 months ago

Working off this PR https://github.com/oxen-io/session-desktop/pull/2281 which adds shortcuts for the 'Delete' and 'Backspace' keys to delete a message when a user is in selection mode.

This PR extends additional keyboard shortcuts for modals created using the SessionConfirm dialog component, adding 'Escape' which will call the onClickCancelHandler to close the modal and 'Enter' which will call the onClickOkHandler. This should make navigating deletion dialogs easier.

yougotwill commented 3 months ago

Hi @KeeJef I have some concerns about this PR. Can we discuss further before merging? Never mind. I was confused. I think we are good. Just reviewing to confirm my understanding.