Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed & cleaned up Vietnamese layout. See #136

  • Loading branch information...
commit 6be87e2f2683d7dd3dd2194cdc281e2f1b4d43c7 1 parent 02a44ee
@Mottie authored
Showing with 28 additions and 20 deletions.
  1. +1 −1  layouts.html
  2. +27 −19 layouts/vietnamese.js
View
2  layouts.html
@@ -112,7 +112,7 @@
"Thai (qwerty):thai-qwerty",
"Turkish (q):turkish-q",
"Turkish (f):turkish-f",
- "Vietnamese (qwerty):vietamese-qwerty"
+ "Vietnamese (qwerty):vietnamese-qwerty"
],
t, o = '';
View
46 layouts/vietnamese.js
@@ -1,34 +1,42 @@
-/* Viet keyboard layouts
- * contains layout: 'viet-qwerty'
+/* Vietnamese keyboard layouts + Telex key combinations (see https://github.com/Mottie/Keyboard/pull/136)
+ * contains layout: 'vietnamese-qwerty'
* Vinh Can Code: tbvinh@gmail.com
+ *
* To use:
- * Point to this js file into your page header: <script src="layouts/viet.js" type="text/javascript"></script>
- * Initialize the keyboard using: $('input').keyboard({ layout: 'viet-qwerty' });
+ * Point to this js file into your page header: <script src="layouts/vietnamese.js" type="text/javascript"></script>
+ * Initialize the keyboard using: $('input').keyboard({ layout: 'vietnamese-qwerty' });
*
* license for this file: WTFPL, unless the source layout site has a problem with me using them as a reference
*/
-/* based on http://ascii-table.com/keyboard.php/190 */
-$.keyboard.layouts['vietamese-qwerty'] = {
- 'default' : [
+/* based on http://ascii-table.com/keyboard.php/461 */
+$.keyboard.layouts['vietnamese-qwerty'] = {
+ 'default' : [
"` 1 2 3 4 5 6 7 8 9 0 - = {bksp}",
- "{tab} q w e r t y u i o p [ ]",
- "a s d f g h j k l ; ' \\ {enter}",
+ "{tab} q w e r t y u i o p [ ] \\",
+ "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' : [
- '| ! " # $ % ^ & * ( ) _ + {bksp}',
- "{tab} Q W E R T Y U I O P @",
- "A S D F G H J K L { } {enter}",
+ '~ ! @ # $ % ^ & * ( ) _ + {bksp}',
+ "{tab} Q W E R T Y U I O P { } |",
+ "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' : [
- '| ! " # $ % ^ & * ( ) _ + {bksp}',
- "{tab} Q W E R T Y U I O P \u00c7 @",
- "A S D F G H J K L { } {enter}",
- "{shift} > Z X C V B N M ; : ? {shift}",
+ '{empty} \u0103 \u00e2 \u00ea \u00f4 {empty} \u031b {empty} {empty} {empty} \u0111 \u002d \u20ab {bksp}',
+ "{tab} {empty} {empty} {empty} {empty} {empty} \u00ff {empty} {empty} \u0153 {empty} \u01b0 \u01a1 {empty}",
+ "{empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} { } \u0302 {enter}",
+ "{shift} {empty} {empty} \u00e7 {empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} {shift}",
+ "{accept} {alt} {space} {alt} {cancel}"
+ ],
+ 'alt-shift' : [
+ '{empty} \u0102 \u00c2 \u00ca \u00d4 {empty} {empty} {empty} {empty} {empty} \u0110 \u005f + {bksp}',
+ "{tab} {empty} {empty} {empty} {empty} {empty} \u0178 {empty} {empty} \u0152 {empty} \u01af \u01a0 {empty}",
+ "{empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} { } \u0308 {enter}",
+ "{shift} {empty} {empty} \u00c7 {empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} {empty} {shift}",
"{accept} {alt} {space} {alt} {cancel}"
]
};
@@ -37,7 +45,7 @@ $.keyboard.layouts['vietamese-qwerty'] = {
// please update this section to match this language and email me with corrections!
// ***********************
if (typeof(language) === 'undefined') { var language = {}; };
-language.viet = {
+language.vietnamese = {
display : {
'a' : '\u2714:Validate (Shift-Enter)', // check mark - same action as accept
'accept' : 'accept (Shift-Enter)',
@@ -65,7 +73,7 @@ language.viet = {
// This will replace all default language options with these language options.
// it is separated out here so the layout demo will work properly.
-$.extend(true, $.keyboard.defaultOptions, language.viet);
+$.extend(true, $.keyboard.defaultOptions, language.vietnamese);
$.extend(true, $.keyboard.defaultOptions.combos, {
@@ -105,4 +113,4 @@ $.extend(true, $.keyboard.defaultOptions.combos, {
});
-$.keyboard.comboRegex = /([ueoaidy"\u01B0""\u01A1""\u0103""\u00E2""\u0055""\u01AF""\u01A0""\u0102""\u00C2""\u00E2""\u00F4""\u00EA""\u00C2""\u00D4""\u00CA"])([a-z,0-9])/gim;
+$.keyboard.comboRegex = /([ueoaidy\u01B0\u01A1\u0103\u00E2\u0055\u01AF\u01A0\u0102\u00C2\u00E2\u00F4\u00EA\u00C2\u00D4\u00CA])([a-z,0-9])/gim;
Please sign in to comment.
Something went wrong with that request. Please try again.