Skip to content

Commit

Permalink
Batak Karo (btx) keyboard (#746)
Browse files Browse the repository at this point in the history
* Batak Karo (btx) keyboard

New keyboard

* Update btx-keyboard.js

* Update btx-keyboard.js

---------

Co-authored-by: SrishAkaTux <[email protected]>
Co-authored-by: SrishAkaTux <[email protected]>
  • Loading branch information
3 people authored Oct 2, 2024
1 parent c0874a3 commit 72fd5ba
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
65 changes: 65 additions & 0 deletions rules/btx/btx-keyboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
( function ( $ ) {
'use strict';

var karoKbd = {
id: 'btx-keyboard',
name: 'Surat Karo',
description: 'QWERTY-based Batak Karo keyboard',
date: '2023-07-28',
URL: 'https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods/btx-keyboard',
author: 'Benny Lin',
license: 'GPLv3',
version: '1.0',
patterns: [
[ '(q|Q)', '\u1BF2' ],// 1BF2 \u1BF2 BATAK PANGOLAT (PANGGOTAP) = virama
[ '(w|QW)', '\u1BCB' ],//1BCB \u1BCB BATAK LETTER WA
[ 'e', '\u1BE9' ],//1BE9 \u1BE9 BATAK VOWEL SIGN EE = talinga
[ 'E', '\u1BE7' ],//1BE7 \u1BE7 BATAK VOWEL SIGN E = kebereten
[ '(r|R)', '\u1BD2' ],//1BD2 \u1BD2 BATAK LETTER RA
[ 't', '\u1BD6' ],//1BD6 \u1BD6 BATAK LETTER SOUTHERN TA
[ 'T', '\u1BD7' ],//1BD7 \u1BD7 BATAK LETTER NORTHERN TA
[ '(y|Y)', '\u1BDB' ],//1BDB \u1BDB BATAK LETTER YA
[ 'u', '\u1BEE' ],//1BEE \u1BEE BATAK VOWEL SIGN U = boruta
[ 'U', '\u1BE5' ],//1BE5 \u1BE5 BATAK LETTER ina ni surat U
[ 'i', '\u1BEA' ],//1BEA \u1BEA BATAK VOWEL SIGN I = ulua
[ 'I', '\u1BE4' ],//1BE4 \u1BE4 BATAK LETTER ina ni surat I
[ '(o|O)', '\u1BEC' ],//1BEC \u1BEC BATAK VOWEL SIGN O = siala ulu
[ '(p|P)', '\u1BC7' ],//1BC7 \u1BC7 BATAK LETTER PA

[ '(a|A)', '\u1BC0' ],//1BC0 \u1BC0 BATAK LETTER A
[ '(s|S)', '\u1BD8' ],//1BD8 \u1BD8 BATAK LETTER SA
[ '(d|D)', '\u1BD1' ],//1BD1 \u1BD1 BATAK LETTER DA
[ '(f|F)', '\u1BF3' ],//1BF3 \u1BF3 BATAK PANONGONAN = virama
[ '(g|G)', '\u1BCE' ],//1BCE \u1BCE BATAK LETTER GA
[ 'h', '\u1BC0' ],//1BC0 \u1BC0 BATAK LETTER A = HA
[ 'H', '\u1BF1' ],//1BF1 \u1BF1 BATAK CONSONANT SIGN H = hajoringan (-h)
[ '(j|J)', '\u1BD0' ],//1BD0 \u1BD0 BATAK LETTER JA
[ '(k|K)', '\u1BC2' ],//1BC2 \u1BC2 BATAK LETTER HA = KA
[ '(l|L)', '\u1BDE' ],//1BDE \u1BDE BATAK LETTER LA

[ 'z', '\u1BDD' ],//1BDD \u1BDD BATAK LETTER NGA
[ 'Z', '\u1BF0' ],//1BF0 \u1BF0 BATAK CONSONANT SIGN NG = amisara (-ng)
[ '(x|X)', '\u1BE0' ],//1BE0 \u1BE0 BATAK LETTER NYA
[ '(c|C)', '\u1BE0' ],//1BE0 \u1BE0 BATAK LETTER NYA = CA
[ '(v|V)', '\u1BE6' ],//1BE6 \u1BE6 BATAK SIGN TOMPI
[ '(b|B)', '\u1BC5' ],//1BC5 \u1BC5 BATAK LETTER BA
[ 'n', '\u1BC9' ],//1BC9 \u1BC9 BATAK LETTER NA
[ 'N', '\u1BE2' ],//1BE2 \u1BE2 BATAK LETTER NDA (Karo)
[ 'm', '\u1BD4' ],//1BD4 \u1BD4 BATAK LETTER MA
[ 'M', '\u1BE3' ],//1BE3 \u1BE3 BATAK LETTER MBA (Karo)

[ '^^', '^' ],
[ '^', '\u1BF0' ],//1BF0 \u1BF0 BATAK CONSONANT SIGN NG = amisara (-ng)
[ '<<', '<' ],
[ '<', '\u1BDD' ]//1BDD \u1BDD BATAK LETTER NGA
],
patterns_x: [
[ '4', '\u1BFC' ],//1BFC \u1BFC BATAK SYMBOL BINDU NA METEK
[ '5', '\u1BFD' ],//1BFD \u1BFD BATAK SYMBOL BINDU PINARBORAS
[ '6', '\u1BFE' ],//1BFE \u1BFE BATAK SYMBOL BINDU JUDUL
[ '7', '\u1BFF' ]//1BFF \u1BFF BATAK SYMBOL BINDU PANGOLAT
]
};

$.ime.register( karoKbd );
}( jQuery ) );
8 changes: 8 additions & 0 deletions src/jquery.ime.inputmethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
name: 'Toba Transliteration',
source: 'rules/bbc/bbc-transliteration.js'
},
'btx-keyboard': {
name: 'Karo Keyboard',
source: 'rules/btx/btx-keyboard.js'
},
'bts-keyboard': {
name: 'Simalungun Keyboard',
source: 'rules/bts/bts-keyboard.js'
Expand Down Expand Up @@ -1098,6 +1102,10 @@
autonym: 'Batak Toba',
inputmethods: [ 'bbc-transliteration' ]
},
btx: {
autonym: 'Batak Karo',
inputmethods: [ 'btx-keyboard' ]
},
bts: {
autonym: 'Batak Simalungun',
inputmethods: [ 'bts-keyboard' ]
Expand Down
48 changes: 48 additions & 0 deletions test/jquery.ime.test.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,54 @@ var palochkaVariants = {
{ input: [ [ '7', true ] ], output: '᯿', description: 'Toba Transliteration - alt-7 - bindu pangolat' }
]
},
{
description: 'Batak Karo keyboard test',
inputmethod: 'btx-keyboard',
tests: [
{ input: 'q', output: '᯲', description: 'Karo keyboard - q = pangolat' },
{ input: 'w', output: 'ᯋ', description: 'Karo keyboard - wa' },
{ input: 'e', output: 'ᯩ', description: 'Karo keyboard = -e' },
{ input: 'r', output: 'ᯒ', description: 'Karo keyboard - ra' },
{ input: 't', output: 'ᯖ', description: 'Karo keyboard - southern ta' },
{ input: 'y', output: 'ᯛ', description: 'Karo keyboard - ya' },
{ input: 'u', output: 'ᯮ', description: 'Karo keyboard = -u' },
{ input: 'i', output: 'ᯪ', description: 'Karo keyboard = -i' },
{ input: 'o', output: 'ᯬ', description: 'Karo keyboard = -o' },
{ input: 'p', output: 'ᯇ', description: 'Karo keyboard - pa' },

{ input: 'a', output: 'ᯀ', description: 'Karo keyboard - a' },
{ input: 's', output: 'ᯘ', description: 'Karo keyboard - sa' },
{ input: 'd', output: 'ᯑ', description: 'Karo keyboard - da' },
{ input: 'f', output: '᯳', description: 'Karo keyboard - f = panongonan' },
{ input: 'g', output: 'ᯎ', description: 'Karo keyboard - ga' },
{ input: 'h', output: 'ᯀ', description: 'Karo keyboard - ha = a' },
{ input: 'j', output: 'ᯐ', description: 'Karo keyboard - ja' },
{ input: 'k', output: 'ᯂ', description: 'Karo keyboard - ka' },
{ input: 'l', output: 'ᯞ', description: 'Karo keyboard - la' },

{ input: 'z', output: 'ᯝ', description: 'Karo keyboard - z = nga' },
{ input: 'x', output: 'ᯠ', description: 'Karo keyboard - x = nya' },
{ input: 'c', output: 'ᯠ', description: 'Karo keyboard - ca = nya' },
{ input: 'v', output: '᯦', description: 'Karo keyboard - v = tompi' },
{ input: 'b', output: 'ᯅ', description: 'Karo keyboard - ba' },
{ input: 'n', output: 'ᯉ', description: 'Karo keyboard - na' },
{ input: 'm', output: 'ᯔ', description: 'Karo keyboard - ma' },

{ input: 'E', output: 'ᯧ', description: 'Karo keyboard - E - kebereten' },
{ input: 'T', output: 'ᯗ', description: 'Karo keyboard - northern ta' },
{ input: 'U', output: 'ᯥ', description: 'Karo keyboard - U - syllable "u"' },
{ input: 'I', output: 'ᯤ', description: 'Karo keyboard - I - syllable "i"' },
{ input: 'H', output: 'ᯱ', description: 'Karo keyboard - H - hajoringan "-h"' },
{ input: 'N', output: 'ᯢ', description: 'Karo keyboard - nda' },
{ input: 'M', output: 'ᯣ', description: 'Karo keyboard - mba' },
{ input: 'Z', output: 'ᯰ', description: 'Karo keyboard - Z - amisara "-ng"' },

{ input: [ [ '4', true ] ], output: '᯼', description: 'Karo keyboard - alt-4 - bindu na metek' },
{ input: [ [ '5', true ] ], output: '᯽', description: 'Karo keyboard - alt-5 - bindu pinarboras' },
{ input: [ [ '6', true ] ], output: '᯾', description: 'Karo keyboard - alt-6 - bindu judul' },
{ input: [ [ '7', true ] ], output: '᯿', description: 'Karo keyboard - alt-7 - bindu pangolat' }
]
},
{
description: 'Batak Simalungun keyboard test',
inputmethod: 'bts-keyboard',
Expand Down

0 comments on commit 72fd5ba

Please sign in to comment.