Skip to content

Commit

Permalink
Add click consonants keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
amire80 committed Sep 24, 2024
1 parent 7bce03e commit 8340899
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
37 changes: 37 additions & 0 deletions rules/mul-click/mul-click-tilde.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
( function ( $ ) {
'use strict';

var clickTilde = {
id: 'mul-click-tilde',
name: 'Click tilde',
description: 'Click input keyboard',
date: '2024-09-24',
URL: 'https://github.com/wikimedia/jquery.ime',
author: 'Amir E. Aharoni',
license: 'GPLv3',
version: '1.0',
patterns: [
// Typing based on shape
[ '~o', 'ʘ' ], // U+0298: Bilabial click
[ '~1', 'ǀ' ], // U+01C0: Dental click (tilde + 1 => not a pipe)
[ 'ǀ1', 'ǁ' ], // U+01C1: Lateral click (not a pipe + 1 => double pipe)
[ '~=', 'ǂ' ], // U+01C2: Alveolar click
[ '~#', 'ǂ' ], // U+01C2: Alveolar click
[ '~!', 'ǃ' ], // U+01C3: Retroflex click (tilde + exclamation point => not an exclamation point)
[ '~,', '𝼊' ], // U+1DF0A: Retroflex click with retroflex hook

// Typing based on Zulu and Xhosa orthography
[ '~c', 'ǀ' ], // U+01C0: Dental click (not a pipe!)
[ '~x', 'ǁ' ], // U+01C1: Lateral click
[ '~q', 'ǃ' ], // U+01C3: Retroflex click (not an exclamation point!)

[ '~\\\\', '\u0300' ], // Combining grave
[ '~/', '\u0301' ], // Combining acute
[ '~\\^', '\u0302' ], // Combining circumflex
[ '~\\{', '\u0303' ], // Combining tilde
[ '~-', '\u0304' ] // Combining macron
]
};

$.ime.register( clickTilde );
}( jQuery ) );
8 changes: 8 additions & 0 deletions src/jquery.ime.inputmethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@
name: 'Burkina Faso tilde keyboard',
source: 'rules/mul-bf/mul-bf.js'
},
'mul-click-tilde': {
name: 'Click consonants keyboard',
source: 'rules/mul-click/mul-click-tilde.js'
},
'mul-cm': {
name: 'General Alphabet of Cameroon Languages tilde keyboard',
source: 'rules/mul-cm/mul-cm.js'
Expand Down Expand Up @@ -1478,6 +1482,10 @@
autonym: 'မြန်မာ',
inputmethods: [ 'my-mm3', 'my-xkb' ]
},
naq: {
autonym: 'Khoekhoegowab',
inputmethods: [ 'mul-click-tilde' ]
},
nb: {
autonym: 'Norsk (bokmål)',
inputmethods: [ 'nb-normforms', 'nb-tildeforms' ]
Expand Down
15 changes: 15 additions & 0 deletions test/jquery.ime.test.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -4625,6 +4625,21 @@ var palochkaVariants = {
{ input: 'a~{', output: 'ã', description: 'Burkina Faso tilde keyboard - ã' }
]
},
{
description: 'Click consonant tilde keyboard test',
inputmethod: 'mul-click-tilde',
tests: [
{ input: '~o', output: 'ʘ', description: 'Click consonant tilde keyboard test - ~o -> ʘ' },
{ input: '~1', output: 'ǀ', description: 'Click consonant tilde keyboard test - ~1 -> ǀ' },
{ input: '~11', output: 'ǁ', description: 'Click consonant tilde keyboard test - ~11 -> ǁ' },
{ input: '~=', output: 'ǂ', description: 'Click consonant tilde keyboard test - ~= -> ǂ' },
{ input: '~#', output: 'ǂ', description: 'Click consonant tilde keyboard test - ~# -> ǂ' },
{ input: '~!', output: 'ǃ', description: 'Click consonant tilde keyboard test - ~! -> ǃ' },
{ input: '~,', output: '𝼊', description: 'Click consonant tilde keyboard test - ~, -> 𝼊' },
{ input: 'a~\\a~/a~^a~{a~-', output: 'aaaaa', description: 'Click consonant tilde keyboard test - ' },
{ input: '~c~x~q', output: 'ǀǁǃ', description: 'Click consonant tilde keyboard test - cxq -> ǀǁǃ' }
]
},
{
description: 'General Alphabet of Cameroon Languages tilde keyboard test',
inputmethod: 'mul-cm',
Expand Down

0 comments on commit 8340899

Please sign in to comment.