Hey devs, i have a preliminary version of the keyboards shortcuts plugin with 
user settings. It was a complete rewrite.  I struggled a lot with what to 
support as far as keys go. Javascript has multiple key events you can hook 
into, each with their pros and cons. The easiest would have been to use 
'keypress', but then you miss out on a lot of keys (basically only a-z0-9 and a 
few extras). 

I used 'keydown', but because the browser landscape with regards to keyboard 
events is a huge mess, im limiting the allowed keys to a relatively small 
subset. If you think 'how hard can it be', i invite you to read 
http://unixpapa.com/js/key.html and weep. And that page is even outdated, as I 
found opera responses that did not match any of that and conflicted with apple 
meta keys. 

So, at least for now, you can use a-z, 0-9, F1-F12, Page Up, Page Down, End, 
Home, Insert Delete and Num0-9, and all of those combined with Shift/Ctrl/Alt.  
Yes, this means you cant use / , . ? [ ]  ; : ' " etc. The browsers simply 
return too many permutation differences to support all that.  I may be able to 
support some of those at a later stage. 

I also replaced the keyboard icon, I redid the help popup, and i have 
preliminary support for other plugins. But that probably needs a bit more 
testing. I dont have all available roundcube commands supported yet, thats 
simply a matter of going through them. And it's pretty easy to create your own 
commands, so if anyone would like something specific done that can be create in 
javascript and could be useful to others, by all means tell me.

If you have some time, you can get the current alpha at  
https://github.com/corbosman/keyboard_shortcuts/tree/usersetting

Let me know if you find any bugs, or have suggestions,

Cor

_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev

Reply via email to