Labs/Bespin/KnownIssues: Difference between revisions

Jump to navigation Jump to search
Line 3: Line 3:
==== Why doesn't Bespin support i18n well? ====
==== Why doesn't Bespin support i18n well? ====


This is something we very much want to fix. Unfortunately it isn't trivial. We have a couple of key issues right now:
This is something we very much want to fix. Unfortunately it isn't trivial. Our problem is that we do a lot in the key handling side, and we know that on foreign keyboard you often have to hold down a couple of keys to get a keypress event that makes sense (e.g. to get a { in the document).


1. editor.js limits the characters that we allow through:
We have started to make this work better, and contributors like Andrea's have given us great thoughts on using a hidden textarea to get us through, and we need to work more on this. Please help!
 
    // Only allow ascii through
    if ((e.charCode >= 32) && (e.charCode <= 126)) {
        args.newchar = String.fromCharCode(e.charCode);
        actions.insertCharacter(args);
    }
 
2. keys.js has an opt-in approach where we specify what we allow through to the browser versus eat up.
 
    if (e.metaKey || e.altKey) { // Apple or Alt key
        if ([Key.K, Key.L, Key.N, Key.O, Key.T, Key.W, Key.PLUS, Key.MINUS, Key.TILDE,
            Key.ZERO, Key.ONE, Key.TWO, Key.THREE, Key.FOUR, Key.FIVE, Key.SIX, Key.SEVEN, Key.EIGHT, Key.NINE].include(e.keyCode)) {
            return true;
        }
    }
 
This ties into the next issue...


==== I am having strange issues with my key bindings ====
==== I am having strange issues with my key bindings ====
355

edits

Navigation menu