Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add click consonants keyboard #795

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 'àáâãā', 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
Loading