/
catalan.js
75 lines (72 loc) · 3.11 KB
/
catalan.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/* Catalan keyboard layouts
* contains layout: 'catalan-qwerty'
*
* To use:
* Point to this js file into your page header: <script src="layouts/catalan.js" type="text/javascript"></script>
* Initialize the keyboard using: $('input').keyboard({ layout: 'catalan-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/173-1 */
$.keyboard.layouts['catalan-qwerty'] = {
'default' : [
"\u00ba 1 2 3 4 5 6 7 8 9 0 ' \u00a1 {bksp}",
"{tab} q w e r t y u i o p \u0300 +",
"a s d f g h j k l \u00f1 \u0301 \u00e7 {enter}",
"{shift} < z x c v b n m , . - {shift}",
"{accept} {alt} {space} {alt} {cancel}"
],
'shift' : [
'\u00aa ! " \u00b7 $ % & / ( ) = ? \u00bf {bksp}',
"{tab} Q W E R T Y U I O P \u0302 *",
"A S D F G H J K L \u00d1 \u0308 \u00c7 {enter}",
"{shift} > Z X C V B N M ; : _ {shift}",
"{accept} {alt} {space} {alt} {cancel}"
],
'alt' : [
'\\ \u007c @ # \u0303 5 \u00ac 7 8 9 0 \u0027 \u00a1 {bksp}',
"{tab} q w \u20ac r t y u i o p [ ]",
"a s d f g h j k l \u00f1 { } {enter}",
"{shift} \u007c z x c v b n m , . - {shift}",
"{accept} {alt} {space} {alt} {cancel}"
],
'alt-shift' : [
'\u00aa ! " \u00b7 $ % & / ( ) = ? \u00bf {bksp}',
"{tab} Q W E R T Y U I O P [ ]",
"A S D F G H J K L \u00d1 { } {enter}",
"{shift} > Z X C V B N M ; : _ {shift}",
"{accept} {alt} {space} {alt} {cancel}"
]
};
// Keyboard Language
// please update this section to match this language and email me with corrections!
// ***********************
if (typeof(language) === 'undefined') { var language = {}; };
language.catalan = {
display : {
'a' : '\u2714:Accept (Shift-Enter)', // check mark - same action as accept
'accept' : 'Accept:Accept (Shift-Enter)',
'alt' : 'AltGr:Alternate Graphemes',
'b' : '\u2190:Backspace', // Left arrow (same as ←)
'bksp' : 'Bksp:Backspace',
'c' : '\u2716:Cancel (Esc)', // big X, close - same action as cancel
'cancel' : 'Cancel:Cancel (Esc)',
'clear' : 'C:Clear', // clear num pad
'combo' : '\u00f6:Toggle Combo Keys',
'dec' : '.:Decimal', // decimal point for num pad (optional), change '.' to ',' for European format
'e' : '\u21b5:Enter', // down, then left arrow - enter symbol
'enter' : 'Enter:Enter',
'lock' : '\u21ea Lock:Caps Lock', // caps lock
's' : '\u21e7:Shift', // thick hollow up arrow
'shift' : 'Shift:Shift',
'sign' : '\u00b1:Change Sign', // +/- sign for num pad
'space' : ' :Space',
'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 : 'Use mousewheel to see other keys',
};
// 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.catalan);