bugfix
This commit is contained in:
parent
14e60b3430
commit
3ae357bbb1
@ -43,21 +43,7 @@ class BoxViewer(WidgetReady, BoxLayout):
|
||||
kwargs = {k:v for k,v in options.items() if k not in remind }
|
||||
BoxLayout.__init__(self, orientation='vertical', **kwargs)
|
||||
WidgetReady.__init__(self)
|
||||
self.used_keys = [
|
||||
{
|
||||
"keyname":"enter",
|
||||
"modifiers":[]
|
||||
},
|
||||
{
|
||||
"keyname":"up",
|
||||
"modifiers":[]
|
||||
},
|
||||
{
|
||||
"keyname":"down",
|
||||
"modifiers":[]
|
||||
},
|
||||
]
|
||||
self.use_keyboard(self.used_keys)
|
||||
self.use_keyboard()
|
||||
self.selected_data = None
|
||||
self.options = options
|
||||
self.box_width = CSize(options['boxwidth'])
|
||||
|
@ -70,11 +70,6 @@ class WidgetReady(EventDispatcher):
|
||||
return False
|
||||
# Keycode is composed of an integer + a string
|
||||
# If we hit escape, release the keyboard
|
||||
if keycode[1] == 'escape':
|
||||
keyboard.release()
|
||||
|
||||
for ki in self.keyinfos:
|
||||
if ki['keyname'] == keycode[1] and listequal(ki['modifiers'],modifiers):
|
||||
keyinfo = {
|
||||
"keyname":keycode[1],
|
||||
"modifiers":modifiers
|
||||
@ -82,10 +77,6 @@ class WidgetReady(EventDispatcher):
|
||||
self.dispatch('on_key_down',keyinfo)
|
||||
return True
|
||||
|
||||
# Return True to accept the key. Otherwise, it will be used by
|
||||
# the system.
|
||||
return False
|
||||
|
||||
def on_fullscreen(self, instance, value):
|
||||
window = self.get_parent_window()
|
||||
if not window:
|
||||
|
Loading…
Reference in New Issue
Block a user