fixed a bug in keyboard.js...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-06-03 18:30:54 +04:00
parent c38bb8dd50
commit 209f92b1bf
2 changed files with 18 additions and 2 deletions

View File

@ -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...

View File

@ -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 {