de=กำ
This commit is contained in:
31
toEnglish.js
Normal file
31
toEnglish.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
{
|
||||||
|
"api":1,
|
||||||
|
"name":"to English",
|
||||||
|
"description":"I accidently typed English Qwerty text on Thai Kedmanee keyboard",
|
||||||
|
"author":"Tang Mo",
|
||||||
|
"icon":"translation",
|
||||||
|
"tags":"english,ำืเสรห้,เสรห้"
|
||||||
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
// https://github.com/wrong-lang/spark/blob/main/src/layout.ahk
|
||||||
|
var kedmanee = 'ๅ/-ภถุึคตจขชๆไำพะัีรนยบลฃฟหกดเ้่าสวงผปแอิืทมใฝ+๑๒๓๔ู฿๕๖๗๘๙๐"ฎฑธํ๊ณฯญฐ,ฅฤฆฏโฌ็๋ษศซ.()ฉฮฺ์?ฒฬฦ';
|
||||||
|
var qwerty = `1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?`;
|
||||||
|
|
||||||
|
// Qwerty to Kedmanee
|
||||||
|
var source = kedmanee;
|
||||||
|
var dest = qwerty;
|
||||||
|
|
||||||
|
function main(state) {
|
||||||
|
try {
|
||||||
|
const charMap = new Map();
|
||||||
|
for (let i = 0; i < source.length; i++) {
|
||||||
|
charMap.set(source[i], dest[i]);
|
||||||
|
}
|
||||||
|
state.text = state.text.split('').map(char => charMap.get(char) || char).join('');
|
||||||
|
}
|
||||||
|
catch(error) {
|
||||||
|
state.postError("Something strange happened here...")
|
||||||
|
}
|
||||||
|
}
|
||||||
31
toThai.js
Normal file
31
toThai.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
{
|
||||||
|
"api":1,
|
||||||
|
"name":"to Thai",
|
||||||
|
"description":"I accidently typed Thai Kedmanee text on Qwerty keyboard",
|
||||||
|
"author":"Tang Mo",
|
||||||
|
"icon":"translation",
|
||||||
|
"tags":"thai,ะ"
|
||||||
|
}
|
||||||
|
**/
|
||||||
|
|
||||||
|
// https://github.com/wrong-lang/spark/blob/main/src/layout.ahk
|
||||||
|
var kedmanee = 'ๅ/-ภถุึคตจขชๆไำพะัีรนยบลฃฟหกดเ้่าสวงผปแอิืทมใฝ+๑๒๓๔ู฿๕๖๗๘๙๐"ฎฑธํ๊ณฯญฐ,ฅฤฆฏโฌ็๋ษศซ.()ฉฮฺ์?ฒฬฦ';
|
||||||
|
var qwerty = `1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?`;
|
||||||
|
|
||||||
|
// Qwerty to Kedmanee
|
||||||
|
var source = qwerty;
|
||||||
|
var dest = kedmanee;
|
||||||
|
|
||||||
|
function main(state) {
|
||||||
|
try {
|
||||||
|
const charMap = new Map();
|
||||||
|
for (let i = 0; i < source.length; i++) {
|
||||||
|
charMap.set(source[i], dest[i]);
|
||||||
|
}
|
||||||
|
state.text = state.text.split('').map(char => charMap.get(char) || char).join('');
|
||||||
|
}
|
||||||
|
catch(error) {
|
||||||
|
state.postError("Something strange happened here...")
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user