Mercurial > libervia-desktop-kivy
comparison cagou/core/share_widget.py @ 357:4d3a0c4f2430
core: better back key (ESC) management:
- back key (which is mapped to esc keycode by SDL2 backend) is now handler with a platform
specific method when on root widget (i.e. a default widget is selected, or nothing is
selected). Default behaviour is to do nothing, while on Android the app is put to
background
- CagouWidget now has a default key_input method which go back to default widget.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 18 Jan 2020 23:12:52 +0100 |
parents | 38fd457b2158 |
children | f20ec8462493 |
comparison
equal
deleted
inserted
replaced
356:307c2501d8b2 | 357:4d3a0c4f2430 |
---|---|
155 self.filterDataEb | 155 self.filterDataEb |
156 ) | 156 ) |
157 | 157 |
158 def key_input(self, window, key, scancode, codepoint, modifier): | 158 def key_input(self, window, key, scancode, codepoint, modifier): |
159 if key == 27: | 159 if key == 27: |
160 self.close() | 160 return G.local_platform.on_key_back_share(self) |
161 return True |