diff --git a/ui/TODO.otl b/ui/TODO.otl index 301c98bb..12c22eb7 100755 --- a/ui/TODO.otl +++ b/ui/TODO.otl @@ -213,6 +213,18 @@ Roadmap [_] caching config [_] BUG: BASE_URL seems to gain a new trailing '/' on each save... | low priority as this does not affect anything... + [X] BUG: keyboard.js, some combinations resolve problems... + | in current help shows E, F4, alt-F4 as "Open image in ..." + | - E and F4 work OK + | - alt-F4 both close the viewer (default) and open an image. + | + | Example: + | E: doc('Open image in external software', openImage), + | F4: { + | default: 'E', + | alt: doc('Close viewer'), + | }, + | [X] reverse ribbons... [X] slideshow mode... [X] default STUB image... diff --git a/ui/lib/keyboard.js b/ui/lib/keyboard.js index 3ac518db..0ecb6521 100755 --- a/ui/lib/keyboard.js +++ b/ui/lib/keyboard.js @@ -213,8 +213,12 @@ function getKeyHandlers(key, modifiers, keybindings, modes, shifted_keys){ if(modifiers == '?'){ break } - if(typeof(handler[modifiers]) == typeof('str')){ - handler = handler[modifiers] + if(modifiers in handler){ + if(typeof(handler[modifiers]) == typeof('str')){ + handler = handler[modifiers] + } else { + break + } } else if(typeof(handler['default']) == typeof('str')){ handler = handler['default'] } else {