Code Monkey home page Code Monkey logo

gaia-keyboard-demo's Introduction

Gaia Keyboard Demo

This is a off-work fun project to bring the built-in keyboard of Mozilla Firefox OS to the web, and make available on any device.

It is also available as a drop-in library for multi-lingual websites. Try the library test and read it's source code to find out how.

Getting Started

Clone this repo, and execute the following commands:

git submodule init
git submodule update

Underneath

It pulls the keyboard codebase from Gaia, and re-implements navigator.mozInputMethod API so we could communicate between the fake input and the app.

The input has to be a fake one so the native keyboard will not pop-up when you try this page on a touchscreen.

Additionally, other missing APIs that is not provided on Safari Mobile are shimmed.

gaia-keyboard-demo's People

Contributors

autonome avatar janjongboom avatar raylin avatar rudylu avatar timdream avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gaia-keyboard-demo's Issues

Safari 7.1 and iOS 8 fail at WeakMap

After bumping Gaia and include bug 1044525 into the demo, Safari's WeakMap implementation failed to map the DOM element to the object we specified.

Previous Safari and Mobile Safari is not affected because an es6 shim was used in place.

Key separation in uk layout

Looking at uk layout of keyboard I see the problem with separation of some keys.

Here is screenshot:

qjfd2px

I suspect, that the problem might be somewhere in ratio values for two bottom rows in uk.js
https://github.com/mozilla-b2g/gaia/blob/8633318d298bedcf0a6d628277fee2c29b6dc450/apps/keyboard/js/layouts/uk.js#L31

    { value: 'ю' }, { value: '⌫', **ratio: 1.5**, keyCode: KeyEvent.DOM_VK_BACK_SPACE }
  ], [
    { value: '&nbsp', **ratio: 10**, keyCode: KeyboardEvent.DOM_VK_SPACE },

l10n.js not found

l10n.js is used to localize aria-labels on the keyboard app.

Even if this issue is fixed, I don't think l10n.js works cross platform, and we can only localize the keyboard to en-US.

Response is miserable on Mobile Safari

Since the last pull from Gaia the response on Mobile Safari has been unusable. The prime suspect is Flexbox shim. We need to workaround this so people using iPhone could continue playing with the demo.

2x images

Not entirely sure how to redirect path of all these images...

<audio> is not behaving well on Mobile Safari

Every cloneNode() results a network request, and overlapping sound result a prompt saying "This Operation cannot be completed.".

We should probably turn off the sound on Mobile iOS by default, but I hate UA detection :-/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.