Support the "enter" key from a physical keyboard (#379)

* Support the "enter" key from a physical keyboard

I often have a usb keyboard dangling from my printer, and got annoyed I couldn't just hit enter from the console.

https://docs.gtk.org/gtk3/signal.Entry.activate.html

* Fix whitespace for linting
This commit is contained in:
Frank Tackitt 2021-12-24 07:32:07 -07:00 committed by GitHub
parent 22221c61ac
commit d19e303f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ class ConsolePanel(ScreenPanel):
entry.set_hexpand(True)
entry.set_vexpand(False)
entry.connect("focus-in-event", self._show_keyboard)
entry.connect("activate", self._send_command)
enter = self._gtk.Button("Send")
enter.set_hexpand(False)