Giter Club home page Giter Club logo

convert-layout's Introduction

Convert Layout Build Status

Converts keyboard layouts, when user forgot to change it.

var ru = require('convert-layout/ru');

bankcardName.keyup(function () {
    bankcardName.value = ru.toEn(bankcardName.value);
});

Usage

There are 2 ways to load layout. If you need only one layout, just load file directly:

var ru = require('convert-layout/ru');

Also you can get objects with all layouts:

var layouts = require('convert-layout');
layout = layouts[name];

Every layout has fromEn and toEn methods:

ru.toEn('руддщ')    //=> "hello"
ru.fromEn('ghbdtn') //=> "привет"

Layouts

Supported keyboard layouts:

  • Belarusian
  • English QWERTY
  • German
  • Kazakh
  • Russian
  • Ukrainian

If you want to add new keyboard layout:

  1. Fork a project. Create a branch.
  2. Add CODE.js file with layout buttons map. See example in ru.js. Lower case letters will be converted to upper case automatically. But all non-letters symbol should be added in both cases.
  3. Add CODE key to index.js.
  4. Add layout to list above.
  5. Send a pull request.

convert-layout's People

Contributors

ai avatar cyhalothrin avatar radkill avatar y9v avatar vvai avatar

Watchers

James Cloos avatar

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.