Skip to content

Commit

Permalink
handle interrupt (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwormhole authored Dec 26, 2024
1 parent 36d4a57 commit 9437cf4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,22 @@ Create the `virtual-keyboard.desktop` in `/usr/share/applications` and copy the

### FAQs

- Do you plan to add more languages?
- Why is there an error message saying `GskMessage - Failed to realize renderer of type 'GskGLRenderer' for surface 'GdkWaylandToplevel': Failed to create EGL display`?

We can consider as long as we don't break existing languages, I will not support chinese or japanese due to the complexity it brings.
Just do `GSK_RENDERER=cairo ./binary` if you got the binary from the releases, you won't have this message if you build the binary manually on your machine.

- Why Python?
- Do you plan to add more languages?

Safest way to touch GTK and not become a sociopath even if python binding is not feasible and has no docs.
We can consider as long as we don't break existing languages, I will not support chinese or japanese due to the complexity it brings.

- Why GTK?

I use GNOME so I wanted to feel the native experience even though I hate every library GLib ecosystem produce in raw complex macro-maniac C

- Will you support GTK3 or Python 2.7?
I use GNOME so I wanted to feel the native experience.

No, please use up-to-date software
- Will you support GTK3?

### TODOs
No, please use up-to-date software.

- [X] Design the layout for buttons with label size and color
- [X] Finish the text area input implementation with Gtk.Entry
- [X] Add sub-menu to pick target languages
- [X] Key Event presses follows target language mapping
- [X] Port it to GTK 4

### References

Expand Down
7 changes: 5 additions & 2 deletions keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,8 @@ def do_activate(self):

if __name__ == "__main__":
app: KeyboardApp = KeyboardApp()
exit_status: int = app.run(sys.argv)
sys.exit(exit_status)
try:
exit_status = app.run(sys.argv)
sys.exit(exit_status)
except KeyboardInterrupt:
sys.exit(0)
Binary file modified screenshots/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9437cf4

Please sign in to comment.