Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Keyboard alternate layout can't be accessed anymore #752

Merged
merged 1 commit into from Mar 9, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions apps/homescreen/js/keyboard.js
Expand Up @@ -850,8 +850,10 @@ const IMEManager = {

// This gives layout author the ability to rewrite AlternateLayoutKeys
var hasSpecialCode = specialCodes.indexOf(key.keyCode) > -1;
if (!(key.keyCode < 0 || hasSpecialCode) && this.isAlternateLayout)
keyChar = Keyboards[ this.currentKeyboard ]['alternateLayoutOverwrite'][keyChar] || keyChar;
if (!(key.keyCode < 0 || hasSpecialCode) && this.isAlternateLayout) {
if (Keyboards[this.currentKeyboard]['alternateLayoutOverwrite'])
keyChar = Keyboards[this.currentKeyboard]['alternateLayoutOverwrite'][keyChar];
}

var code = key.keyCode || keyChar.charCodeAt(0);

Expand All @@ -874,14 +876,14 @@ const IMEManager = {
// Alternate layout key
// This gives the author the ability to change the alternate layout key contents
var alternateLayoutKey = "?123";
if( Keyboards[ this.currentKeyboard ]['alternateLayoutKey']) {
alternateLayoutKey = Keyboards[ this.currentKeyboard ]['alternateLayoutKey'];
if (Keyboards[this.currentKeyboard]['alternateLayoutKey']) {
alternateLayoutKey = Keyboards[this.currentKeyboard]['alternateLayoutKey'];
}

// This gives the author the ability to change the basic layout key contents
var basicLayoutKey = "ABC";
if( Keyboards[ this.currentKeyboard ]['basicLayoutKey']) {
basicLayoutKey = Keyboards[ this.currentKeyboard ]['basicLayoutKey'];
if (Keyboards[this.currentKeyboard]['basicLayoutKey']) {
basicLayoutKey = Keyboards[this.currentKeyboard]['basicLayoutKey'];
}

ratio -= 2;
Expand Down