Giter Site home page Giter Site logo

quentint / long-press Goto Github PK

View Code? Open in Web Editor NEW
306.0 19.0 50.0 68 KB

jQuery plugin to ease the writing of accented or rare characters.

Home Page: http://toki-woki.net/lab/long-press/

CSS 34.35% JavaScript 49.64% HTML 16.01%
rare-characters jquery-plugin

long-press's Introduction

Long Press

Long Press is a jQuery plugin to ease the writing of accented or rare characters.

Installation

You can install using bower as well as npm

  • Install using bower bower install long-press

  • Install using npm npm install long-press

Demo & Usage

A demo can be seen here: http://toki-woki.net/lab/long-press/

Focus a form field and hold key to access alternate characters. Try ‘a’, ‘e’, ‘u’, ‘i’, ‘o’ or ‘$’ for example.

Pick letter by:

  • using mouse wheel;
  • hovering over it with your mouse;
  • using arrow keys.

Release key to confirm choice.

Context

I wrote this plugin because I wanted to be able to insert rare characters as easily as on Android or iOS. I learned pretty quickly after doing it that Moutain Lion already offers such a feature. This is called reinventing the wheel...

Files

The most insteresting file in the repository is js/jquery.longpress.js. Other stuff is mainly for demonstration purposes.

Status

The plugin is still very young and could be improved/optimized and stuff.

Customization

Characters suggestions can easily be edited in js/jquery.longpress.js.

Licence

MIT License http://opensource.org/licenses/mit-license.php

long-press's People

Contributors

azarzaza avatar binaryman008 avatar keytomath avatar quentint avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

long-press's Issues

Plugin is currently unusable for proper typing

This plugin is an awesome idea, currently when I do my Spanish lessons online using accented characters is a giant pain - however the current implementation means that I can't use it while touch typing.

According to the documentation you can select a character in one of the following three ways:

Pick letter by:

  • using mouse wheel;
  • hovering over it with your mouse;
  • using arrow keys.

But when you are touch typing and holding down a key (i and o are the best example) it is impossible to do any of those three things without very effortful hand movements, including completely crossing your arms.

I think the OS X solution solves this problem perfectly:

  • allow selection of characters using number keys
  • require the releasing of the base character before selection is made, freeing up your hands

Thanks

customize the charecters

hi, awesome plugin, but could we add our own list of characters, it is very necessarily specially for other languages like Arabic and Hebrew

thanks in advanced.

Cyrillic

May be add the Cyrillic? If you want, I can do it.

onmousewheel issue

In the line 82 of jquery.longpress.js, you have:

" $(window).mousewheel(onWheel); "

That function is defined as an extension i think, but if i don't comment that particular line, the plugin doesn't work at all, i get this error:

Uncaught TypeError: Object [object Object] has no method 'mousewheel'

This ONLY makes the mouse wheel useless on the plugin, so it doesn't bother me a lot, but maybe you want to take a look at this.

System reference:
Ubuntu 12.04
Firefox/Chromium (latest stable version)
App implemented in Ruby on Rails
Jquery 1.8.2

Thanks!

PD: great plugin i will be using this in a dictionary/translator app for my gf
PD2: english is not my main languaje, sorry if any word is wrong :(

Missing Ō ō

While the other letters include macrons, the 'Ō' and 'ō' characters are missing.

Feature suggestion

Great idea!
Feature suggestion: because c can lead to ç and u can lead to µ, ç should lead to c and alternatives, µ should lead to u and alternatives too.

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.