Permalink
Browse files

Japanese layout added

Japanese layouts added:
japanese-kana and japanese-qwerty
  • Loading branch information...
1 parent ff3c468 commit 867eef012f951e03ae5ce3593fb2708f3f2e9850 @pacoalcantara pacoalcantara committed Sep 3, 2012
Showing with 30 additions and 24 deletions.
  1. +29 −22 layouts/japanese.js
  2. +1 −2 layouts/spanish.js
View
@@ -1,38 +1,39 @@
/* Japanese (hiragana and katakana) keyboard layouts
- * contains layouts for: 'hiragana-katakana' & 'japanese-qwerty'
+ * contains layouts for: 'japanese-kana' & 'japanese-qwerty'
*
* To use:
* Point to this js file into your page header: <script src="layouts/japanese.js" type="text/javascript"></script>
- * Initialize the keyboard using: $('input').keyboard({ layout: 'hiragana-katakana' });
+ * Initialize the keyboard using: $('input').keyboard({ layout: 'japanese-kana' });
*
* license for this file: WTFPL, unless the source layout site has a problem with me using them as a reference
*
* Japanese layout by Paco Alcantara (https://github.com/pacoalcantara), based on:
* http://www.fileformat.info/info/unicode/char/search.htm
* http://www.tamasoft.co.jp/en/general-info/unicode.html
* http://ascii-table.com/keyboard.php/194
+ * Preferably use 'japanese-kana' unless roma-ji characters are needed on input.
*/
-$.keyboard.layouts['hiragana-katakana'] = {
+$.keyboard.layouts['japanese-kana'] = {
'default' : [
'0 1 2 3 4 5 6 7 8 9',
'\u3042 \u3044 \u3046 \u3048 \u304a \u306f \u3072 \u3075 \u3078 \u307b',
'\u304b \u304d \u304f \u3051 \u3053 \u307e \u307f \u3080 \u3081 \u3082',
- '\u3055 \u3057 \u3059 \u305b \u305d \u3084 \u3000 \u3086 \u3088 {bksp}',
+ '\u3055 \u3057 \u3059 \u305b \u305d \u3084 \u0301 \u3086 \u3088 {bksp}',
'\u305f \u3061 \u3064 \u3066 \u3068 \u3089 \u308a \u308b \u308c \u308d',
'\u306a \u306b \u306c \u306d \u306e \u308f \u3092 \u3093 \u3090 \u3091',
- '\u3041 \u3043 \u3045 \u3047 \u3049 \u3099 \u309a \u3000 \u3000 {shift}',
- '\u3083 \u3085 \u3087 \u3063 \u3000 \u30fb \u30fc \u301c \u3000 {alt}',
+ '\u3041 \u3043 \u3045 \u3047 \u3049 \u3099 \u309a \u0301 \u0301 {shift}',
+ '\u3083 \u3085 \u3087 \u3063 \u0301 \u30fb \u30fc \u301c \u0301 {alt}',
'{accept} {space} {cancel} {enter}'
],
'shift' : [
'0 1 2 3 4 5 6 7 8 9',
'\u30a2 \u30a4 \u30a6 \u30a8 \u30aa \u30cf \u30d2 \u30d5 \u30d8 \u30db',
'\u30ab \u30ad \u30af \u30b1 \u30b3 \u30de \u30df \u30e0 \u30e1 \u30e2',
- '\u30b5 \u30b7 \u30b9 \u30bb \u30bd \u30e4 \u3000 \u30e6 \u30e8 {bksp}',
+ '\u30b5 \u30b7 \u30b9 \u30bb \u30bd \u30e4 \u0301 \u30e6 \u30e8 {bksp}',
'\u30bf \u30c1 \u30c4 \u30c6 \u30c8 \u30e9 \u30ea \u30eb \u30ec \u30ed',
'\u30ca \u30cb \u30cc \u30cd \u30ce \u30ef \u30f2 \u30f3 \u30f0 \u30f1',
- '\u30a1 \u30a3 \u30a5 \u30a7 \u30a9 \u3099 \u309a \u3000 \u3000 {shift}',
- '\u30e3 \u30e5 \u30e7 \u30c3 \u3000 \u30fb \u30fc \u301c \u3000 {alt}',
+ '\u30a1 \u30a3 \u30a5 \u30a7 \u30a9 \u3099 \u309a \u0301 \u0301 {shift}',
+ '\u30e3 \u30e5 \u30e7 \u30c3 \u0301 \u30fb \u30fc \u301c \u0301 {alt}',
'{accept} {space} {cancel} {enter}'
],
'alt' : [
@@ -44,27 +45,33 @@ $.keyboard.layouts['hiragana-katakana'] = {
]
};
-/* from http://ascii-table.com/keyboard.php/150G-1 */
$.keyboard.layouts['japanese-qwerty'] = {
'default' : [
- "\u00a7 1 2 3 4 5 6 7 8 9 0 ' \u0302 {bksp}",
- "{tab} q w e r t z u i o p \u00fc \u0308",
- "a s d f g h j k l \u00f6 \u00e4 $ {enter}",
- "{shift} < y x c v b n m , . - {shift}",
+ "1 2 3 4 5 6 7 8 9 0 - ^ \u00a5 {bksp}",
+ "{tab} q w e r t y u i o p \u0040 [",
+ "a s d f g h j k l ; : ] {enter}",
+ "{shift} z x c v b n m , . / \\ {shift}",
"{accept} {alt} {space} {alt} {cancel}"
],
'shift' : [
- '\u00b0 + " * \u00e7 % & / ( ) = ? \u0300 {bksp}',
- "{tab} Q W E R T Z U I O P \u00e8 !",
- "A S D F G H J K L \u00e9 \u00e0 \u00a3 {enter}",
- "{shift} > Y X C V B N M ; : _ {shift}",
+ "! \" # $ % & \' ( ) \u0301 = ~ | {bksp}",
+ "{tab} Q W E R T Y U I O P \u0060 {",
+ "A S D F G H J K L + * } {enter}",
+ "{shift} Z X C V B N M < > ? _ {shift}",
"{accept} {alt} {space} {alt} {cancel}"
],
'alt' : [
- "\u00a7 \u007c @ # 4 5 \u00ac \u00a6 \u00a2 9 0 \u0301 \u0303 {bksp}",
- "{tab} q w \u20ac r t z u i o p [ ]",
- "a s d f g h j k l \u00f6 { } {enter}",
- "{shift} \\ y x c v b n m , . - {shift}",
+ "\u306c \u3075 \u3042 \u3046 \u3048 \u304a \u3084 \u3086 \u3088 \u308f \u307b \u3078 \uff70 {bksp}",
+ "{tab} \u305f \u3066 \u3044 \u3059 \u304b \u3093 \u306a \u306b \u3089 \u305b \uff9e \uff9f",
+ "\u3061 \u3068 \u3057 \u306f \u304d \u304f \u307e \u306e \u308a \u308c \u3051 \u3080 {enter}",
+ "{shift} \u3064 \u3055 \u305d \u3072 \u3053 \u307f \u3082 \u306d \u308b \u3081 \u308d {shift}",
+ "{accept} {alt} {space} {alt} {cancel}"
+ ],
+ 'alt-shift' : [
+ "\u0301 \u0301 \u3041 \u3045 \u3047 \u3049 \u3083 \u3085 \u3087 \u3092 \u0301 \u0301 \u0301 {bksp}",
+ "{tab} \u0301 \u0301 \u3043 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \uff62",
+ "\u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u30f6 \uff63 {enter}",
+ "{shift} \u3063 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \uff64 \uff61 \uff65 \u00a6 {shift}",
"{accept} {alt} {space} {alt} {cancel}"
]
};
View
@@ -98,8 +98,7 @@ language.spanish = {
't' : '\u21e5:Tab', // right arrow to bar (used since this virtual keyboard works with one directional tabs)
'tab' : '\u21e5 Tab:Tab' // \u21b9 is the true tab symbol (left & right arrows)
},
- // Message added to the key title while hovering, if the mousewheel plugin exists
- wheelMessage : 'Utilice la rueda del mouse para ver otras teclas',
+ wheelMessage : 'Utilice la rueda del mouse para ver otras teclas',
};
// This will replace all default language options with these language options.

0 comments on commit 867eef0

Please sign in to comment.