WebAPI/KeboardIME: Difference between revisions

Jump to navigation Jump to search
Line 46: Line 46:
** The allowed value in "types" field is a subset of [http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-type type attribute of input element]: text, search, tel, number, url, email. Other types will be ignored by FxOS Gaia in the initial version because at this point UI for <select> and <input type=date> (called "value selectors") are not open for 3rd-party implementation.
** The allowed value in "types" field is a subset of [http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-type type attribute of input element]: text, search, tel, number, url, email. Other types will be ignored by FxOS Gaia in the initial version because at this point UI for <select> and <input type=date> (called "value selectors") are not open for 3rd-party implementation.


=== IME App Manifest Example ===
{
 
  "name": "3rd-party Keyboard",
  1 {
  "description": "3rd-party Keyboard",
  2   "name": "MyKeyboard",
  "type": "certified",
  3   "description": "A 3rd Party Keyboard",
  "role": "keyboard",
  4   "role": "keyboard",
  "launch_path": "/settings.html",
  5   "launch_path": "/settings.html",
  "developer": {
  6   "permissions": {
    "name": "developer's name",
  7     "keyboard": {}
    "url": "https://keyboard.example.com"
  8   },
  },
  9   "entry_points": {
  "permissions": {
  10     "English": {
    "settings": { "access": "readwrite" },
  11       "launch_path": "/index.html#en",
    "keyboard": {}
  12       "description": "English layout",
  },
  13       "types": ["url", "number"],
  "entry_points": {
              "locales": {
    "en": {
                  "ar":{
      "launch_path": "/index.html#en",
                    "entry_points": {
      "name": "English",
                        "English":{
      "description": "English layout",
                            "name":"الإنجليزية",
      "types": ["url", "text"],
                            "description": "Gaia هاتف"
      "locales": {
                        }
        "en-US": {
                      }
          "name": "English",
                  },
          "description": "English layout"
                  "en-US":{
        },
                    "entry_points": {
        "zh-TW": {
                        "English":{
          "name": "英文",
                          "name": "English",
          "description": "英文鍵盤"
                          "description": "English layout"
        }
                        }
      }
                      }
    },
                  },
    "en-Dvorak": {
                  "fr":{
      "launch_path": "/index.html#en-Dvorak",
                    "entry_points": {
      "name": "English (Dvorak)",
                        "English":{
      "description": "Dvorak layout",
                          "name": "Anglais",
      "types": ["url", "text"]
                          "description": "Anglais layout"
    },
                        }
    "es": {
                      }
      "launch_path": "/index.html#es",
                  }
      "name": "Spanish",
                },
      "description": "Spanish layout",
                "default_locale": "en-US"
      "types": ["url", "text"]
  14     },
    },
  15     "English (Dvorak)": {
    "pt-BR": {
  16       "launch_path": "/index.html#en-Dvorak",
      "launch_path": "/index.html#pt-BR",
  17       "description": "Dvorak layout",
      "name": "Portuguese Brazilian",
  18       "types": ["text", "url", "number"]
      "description": "Portuguese Brazilian layout",
              "locales": {
      "types": ["url", "text"]
                  "ar":{
    },
                    "entry_points": {
    "pl": {
                        "English":{
      "launch_path": "/index.html#pl",
                            "name":"الإنجليزية",
      "name": "Polish",
                            "description": "Gaia هاتف"
      "description": "Polish layout",
                        }
      "types": ["url", "text"]
                      }
    },
                  },
    "ca": {
                  "en-US":{
      "launch_path": "/index.html#ca",
                    "entry_points": {
      "name": "Catalan",
                        "English":{
      "description": "Catalan layout",
                          "name": "English",
      "types": ["url", "text"]
                          "description": "English layout"
    },
                        }
    "cz": {
                      }
      "launch_path": "/index.html#cz",
                  },
      "name": "Czech",
                  "fr":{
      "description": "Czech layout",
                    "entry_points": {
      "types": ["url", "text"]
                        "English":{
    },
                          "name": "Anglais",
    "fr": {
                          "description": "Anglais layout"
      "launch_path": "/index.html#fr",
                        }
      "name": "French",
                      }
      "description": "French layout",
                  }
      "types": ["url", "text"]
                },
    },
                "default_locale": "en-US"
    "de": {
  19     },
      "launch_path": "/index.html#de",
  20     "Spanish": {
      "name": "German",
  21       "launch_path": "/index.html#es",
      "description": "German layout",
  22       "description": "Spanish layout",
      "types": ["url", "text"]
  23       "types": ["text", "number"]
    },
              "locales": {
    "nb": {
                  "ar":{
      "launch_path": "/index.html#nb",
                    "entry_points": {
      "name": "Norwegian Bokmal",
                        "Spanish":{
      "description": "Norwegian Bokmal layout",
                            "name":"الإنجليزية",
      "types": ["url", "text"]
                            "description": "Gaia هاتف"
    },
                        }
    "sk": {
                      }
      "launch_path": "/index.html#sk",
                  },
      "name": "Slovak",
                  "en-US":{
      "description": "Slovak layout",
                    "entry_points": {
      "types": ["url", "text"]
                        "Spanish":{
    },
                          "name": "English",
    "tr-Q": {
                          "description": "English layout"
      "launch_path": "/index.html#tr-Q",
                        }
      "name": "Turkish Q",
                      }
      "description": "Turkish Q layout",
                  },
      "types": ["url", "text"]
                  "fr":{
    },
                    "entry_points": {
    "tr-F": {
                        "Spanish":{
      "launch_path": "/index.html#tr-F",
                          "name": "Anglais",
      "name": "Turkish F",
                          "description": "Anglais layout"
      "description": "Turkish F layout",
                        }
      "types": ["url", "text"]
                      }
    },
                  }
    "ro": {
                },
      "launch_path": "/index.html#ro",
                "default_locale": "en-US"
      "name": "Romanian",
  24     },
      "description": "Romanian layout",
  25     "number": {
      "types": ["url", "text"]
  26       "launch_path": "/index.html#numberLayout",
    },
  27       "description": "Number layout",
    "ru": {
  28       "types": ["number"]
      "launch_path": "/index.html#ru",
              "locales": {
      "name": "Russian",
                  "ar":{
      "description": "Russian layout",
                    "entry_points": {
      "types": ["url", "text"]
                        "number":{
    },
                            "name":"الإنجليزية",
    "sr-Cyrl": {
                            "description": "Gaia هاتف"
      "launch_path": "/index.html#sr-Cyrl",
                        }
      "name": "Serbian (Cyrillic)",
                      }
      "description": "Serbian (Cyrillic) layout",
                  },
      "types": ["url", "text"]
                  "en-US":{
    },
                    "entry_points": {
    "sr-Latn": {
                        "number":{
      "launch_path": "/index.html#sr-Latn",
                          "name": "English",
      "name": "Serbian (Latin)",
                          "description": "English layout"
      "description": "Serbian (Latin) layout",
                        }
      "types": ["url", "text"]
                      }
    },
                  },
    "ar": {
                  "fr":{
      "launch_path": "/index.html#ar",
                    "entry_points": {
      "name": "Arabic",
                        "number":{
      "description": "Arabic layout",
                          "name": "Anglais",
      "types": ["url", "text"]
                          "description": "Anglais layout"
    },
                        }
    "he": {
                      }
      "launch_path": "/index.html#he",
                  }
      "name": "Hebrew",
                },
      "description": "Hebrew layout",
                "default_locale": "en-US"
      "types": ["url", "text"]
  29     }
    },
  30   }
    "hu": {
  31 }
      "launch_path": "/index.html#hu",
      "name": "Hungarian",
      "description": "Hungarian layout",
      "types": ["url", "text"]
    },
    "el": {
      "launch_path": "/index.html#el",
      "name": "Greek",
      "description": "Greek layout",
      "types": ["url", "text"]
    },
    "zh-Hans-Pinyin": {
      "launch_path": "/index.html#zh-Hans-Pinyin",
      "name": "Pinyin",
      "description": "Pinyin",
      "types": ["url", "text"]
    },
    "number": {
      "launch_path": "/index.html#numberLayout",
      "name": "Number",
      "description": "Number layout",
      "types": ["number"]
    }
  },
  "locales": {
    "en-US": {
      "name": "3rd-party Keyboard",
      "description": "3rd-party Keyboard"
    },
    "zh-TW": {
      "name": "第三方鍵盤",
      "description": "第三方鍵盤"
    }
  },
  "default_locale": "en-US"
}


=== Layout Matching Algorithm ===
=== Layout Matching Algorithm ===
Confirmed users
76

edits

Navigation menu