After updating to 5.0.90+ I have this strange behavior on chrome and some other places
when pressing double shift I run javascript to change the last word to greek letters or vice versa.
the difference of the behavior between example and chrome is shown in attached videos
The code is
async (clipboardContentString) => {
const alphabetEN = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const alphabetGR = "αβψδεφγηιξκλμνοπ;ρστθωςχυζΑΒΨΔΕΦΓΗΙΞΚΛΜΝΟΠ;ΡΣΤΘΩΧΥΖ";
// Determine if the first character is in the English alphabet
const firstIsEnglish = alphabetEN.indexOf(clipboardContentString[0]) !== -1;
let newMessage = "";
if (firstIsEnglish) {
// Switch layout to Greek
await trigger_named_async_without_response({
trigger_name: 'changeInputGR',
wait_for_reply: false
});
// Convert only English letters to Greek
for (const char of clipboardContentString) {
const idx = alphabetEN.indexOf(char);
if (idx !== -1) {
// If char is English, map it to the Greek equivalent
newMessage += alphabetGR[idx];
} else {
// Keep anything else (already Greek or punctuation) as is
newMessage += char;
}
}
} else {
// Switch layout to English
await trigger_named_async_without_response({
trigger_name: 'changeInputEN',
wait_for_reply: false
});
// Convert only Greek letters to English
for (const char of clipboardContentString) {
const idx = alphabetGR.indexOf(char);
if (idx !== -1) {
// If char is Greek, map it to the English equivalent
newMessage += alphabetEN[idx];
} else {
// Keep anything else (already English or punctuation) as is
newMessage += char;
}
}
}
return newMessage;
};
it adds a new line or something