Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

BiG-BosS bossbojo

🏠
Working from home
View GitHub Profile
View gist:47f12a2b5c6f3eb21002855a066fdaf0
onChangeLang(char) {
if (char.key === '*') return;
const th_char = 'ๅ/-ภถุึคตจขชๆไำพะัีรนยบลฟหกดเ้่าสวงผปแอิืทมใฝ';
const en_char = '1234567890-=qwertyuiop[]asdfghjkl;\'zxcvbnm,./';
if (th_char.match(char.key)) {
this.Barcode = this.Barcode.substring(0, this.Barcode.length - 1);
for (let i = 0; i < th_char.length; i++) {
if (th_char[i] === char.key) {
this.Barcode += en_char[i];
return;
You can’t perform that action at this time.