japanese.js 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Japanese (hiragana and katakana) keyboard layouts
  2. * contains layouts for: 'japanese-kana' & 'japanese-qwerty'
  3. *
  4. * To use:
  5. * Point to this js file into your page header: <script src="layouts/japanese.js" type="text/javascript"></script>
  6. * Initialize the keyboard using: $('input').keyboard({ layout: 'japanese-kana' });
  7. *
  8. * license for this file: WTFPL, unless the source layout site has a problem with me using them as a reference
  9. *
  10. * Japanese layout by Paco Alcantara (https://github.com/pacoalcantara), based on:
  11. * http://www.fileformat.info/info/unicode/char/search.htm
  12. * http://www.tamasoft.co.jp/en/general-info/unicode.html
  13. * http://ascii-table.com/keyboard.php/194
  14. * Preferably use 'japanese-kana' unless roma-ji characters are needed on input.
  15. */
  16. jQuery.keyboard.layouts['japanese-kana'] = {
  17. 'name' : 'japanese-kana',
  18. 'lang' : ['ja'],
  19. 'normal' : [
  20. '0 1 2 3 4 5 6 7 8 9',
  21. '\u3042 \u3044 \u3046 \u3048 \u304a \u306f \u3072 \u3075 \u3078 \u307b',
  22. '\u304b \u304d \u304f \u3051 \u3053 \u307e \u307f \u3080 \u3081 \u3082',
  23. '\u3055 \u3057 \u3059 \u305b \u305d \u3084 \u3086 \u3088 {bksp}',
  24. '\u305f \u3061 \u3064 \u3066 \u3068 \u3089 \u308a \u308b \u308c \u308d',
  25. '\u306a \u306b \u306c \u306d \u306e \u308f \u3092 \u3093 \u3090 \u3091',
  26. '\u3041 \u3043 \u3045 \u3047 \u3049 \u3099 \u309a \u0301 {shift}',
  27. '\u3083 \u3085 \u3087 \u3063 \u0301 \u30fb \u30fc \u301c {alt}',
  28. '{accept} {space} {cancel} {enter}'
  29. ],
  30. 'shift' : [
  31. '0 1 2 3 4 5 6 7 8 9',
  32. '\u30a2 \u30a4 \u30a6 \u30a8 \u30aa \u30cf \u30d2 \u30d5 \u30d8 \u30db',
  33. '\u30ab \u30ad \u30af \u30b1 \u30b3 \u30de \u30df \u30e0 \u30e1 \u30e2',
  34. '\u30b5 \u30b7 \u30b9 \u30bb \u30bd \u30e4 \u30e6 \u30e8 {bksp}',
  35. '\u30bf \u30c1 \u30c4 \u30c6 \u30c8 \u30e9 \u30ea \u30eb \u30ec \u30ed',
  36. '\u30ca \u30cb \u30cc \u30cd \u30ce \u30ef \u30f2 \u30f3 \u30f0 \u30f1',
  37. '\u30a1 \u30a3 \u30a5 \u30a7 \u30a9 \u3099 \u309a \u0301 {shift}',
  38. '\u30e3 \u30e5 \u30e7 \u30c3 \u0301 \u30fb \u30fc \u301c {alt}',
  39. '{accept} {space} {cancel} {enter}'
  40. ],
  41. 'alt' : [
  42. '0 1 2 3 4 5 6 7 8 9 - ^ \uffe5 {bksp}',
  43. "{tab} q w e r t y u i o p \u0040 [",
  44. "a s d f g h j k l ; : ] {enter}",
  45. " {shift} z x c v b n m , . / \\ {shift}",
  46. "{accept} {space} {alt} {cancel}"
  47. ],
  48. 'alt-shift' : [
  49. '0 1 2 3 4 5 6 7 8 9 - ^ \uffe5 {bksp}',
  50. "{tab} Q W E R T Y U I O P \u0040 [",
  51. "A S D F G H J K L ; : ] {enter}",
  52. " {shift} Z X C V B N M , . / \\ {shift}",
  53. "{accept} {space} {alt} {cancel}"
  54. ]
  55. };
  56. jQuery.keyboard.layouts['japanese-qwerty'] = {
  57. 'name' : 'japanese-qwerty',
  58. 'lang' : ['ja'],
  59. 'normal' : [
  60. "1 2 3 4 5 6 7 8 9 0 - ^ \u00a5 {bksp}",
  61. "{tab} q w e r t y u i o p \u0040 [",
  62. "a s d f g h j k l ; : ] {enter}",
  63. "{shift} z x c v b n m , . / \\ {shift}",
  64. "{accept} {alt} {space} {alt} {cancel}"
  65. ],
  66. 'shift' : [
  67. "! \" # $ % & \' ( ) \u0301 = ~ | {bksp}",
  68. "{tab} Q W E R T Y U I O P \u0060 {",
  69. "A S D F G H J K L + * } {enter}",
  70. "{shift} Z X C V B N M < > ? _ {shift}",
  71. "{accept} {alt} {space} {alt} {cancel}"
  72. ],
  73. 'alt' : [
  74. "\u306c \u3075 \u3042 \u3046 \u3048 \u304a \u3084 \u3086 \u3088 \u308f \u307b \u3078 \uff70 {bksp}",
  75. "{tab} \u305f \u3066 \u3044 \u3059 \u304b \u3093 \u306a \u306b \u3089 \u305b \uff9e \uff9f",
  76. "\u3061 \u3068 \u3057 \u306f \u304d \u304f \u307e \u306e \u308a \u308c \u3051 \u3080 {enter}",
  77. "{shift} \u3064 \u3055 \u305d \u3072 \u3053 \u307f \u3082 \u306d \u308b \u3081 \u308d {shift}",
  78. "{accept} {alt} {space} {alt} {cancel}"
  79. ],
  80. 'alt-shift' : [
  81. "\u0301 \u0301 \u3041 \u3045 \u3047 \u3049 \u3083 \u3085 \u3087 \u3092 \u0301 \u0301 \u0301 {bksp}",
  82. "{tab} \u0301 \u0301 \u3043 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \uff62",
  83. "\u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \u30f6 \uff63 {enter}",
  84. "{shift} \u3063 \u0301 \u0301 \u0301 \u0301 \u0301 \u0301 \uff64 \uff61 \uff65 \u00a6 {shift}",
  85. "{accept} {alt} {space} {alt} {cancel}"
  86. ]
  87. };