Al escribir, reemplaza automáticamente caracteres específicos con otros (es decir, vocales griegas mayúsculas acentuadas)

Estoy buscando una aplicación u otra forma de reemplazar automáticamente caracteres específicos con otros, de una lista de mi definición. Esto debe hacerse en todos los campos de edición de texto posibles, en línea.

Idealmente, escribiría algo de texto y, si el teclado que estoy usando está configurado para hacerlo, lo reemplazaría a medida que escribo o después de que una palabra se completa automáticamente. Desafortunadamente, no he encontrado ninguna aplicación de teclado que permita esto.

Una segunda forma de hacer esto sería completar la escritura en cualquier campo de texto, seleccionar todo el texto escrito, compartir o copiar y pegar en otra aplicación que hará el reemplazo, luego pegar el texto reemplazado nuevamente en el campo de texto. Esta parece ser la solución más realista que se debe buscar, y una que podría considerar escribir yo mismo. Pensé que buscaría una solución más elegante o existente antes de considerar eso.

El objetivo principal de esto es acomodar a quien escribe en griego y quiere usar la funcionalidad de autocompletar de un teclado, en particular para enviar SMS en codificación GSM-ASCII y así poder usar 160 caracteres por SMS.

Todos los teclados que probé (Go Keyboard, Swype, Swiftkey, stock ICS, Samsung) presentan el mismo problema, es decir, las versiones en mayúsculas de las palabras en sus diccionarios griegos incluyen incorrectamente acentos en las vocales. Esto probablemente sucede porque los diccionarios incluyen solo las versiones en minúsculas de las palabras, mientras que automáticamente las escriben en mayúsculas a pedido para ahorrar espacio en la tienda o para evitar lo que perciben como una duplicación.

Desafortunadamente, aunque las vocales griegas minúsculas pueden llevar un acento, las mayúsculas no deben hacerlo. Más importante aún, la codificación GSM-ASCII de 7 bits para la transmisión de SMS que permite 160 caracteres por SMS solo incluye caracteres griegos en mayúsculas sin acentos (no incluye minúsculas). Tan pronto como se escribe un solo carácter en minúsculas o mayúsculas acentuadas, el SMS debe enviarse utilizando la codificación UCS-2 que es de 16 bits y nos limita a 70 caracteres por SMS.

La lista de personajes y sus reemplazos es esta:

Ά => Α
Έ => Ε
Ή => Η
Ί => Ι
Ό => Ο
Ύ => Υ
Ώ => Ω

¿Alguien tendría alguna idea de cómo hacer esto, en una aplicación existente o algún tipo de macro con funcionalidad de reemplazo de cadenas?

Disculpas por la pregunta larga, si llegaste hasta aquí. Pensé que era importante exponer los antecedentes que llevaron a esta limitación. Gracias por adelantado.

En realidad, los SMS de 160 caracteres solo aceptan los caracteres griegos en mayúsculas que no se parecen a los latinos (ΓΔΘΛΞΠΣΦΨΩ). Entonces, no se trata de quitar el acento; necesita convertir a la letra mayúscula latina correspondiente.

Respuestas (2)

Poco después de hacer la pregunta, comencé a explorar la segunda opción que había pensado, a saber, usar una aplicación de terceros intermedia para copiar texto escrito, reemplazar acentos, copiarlo nuevamente y pegarlo nuevamente en el campo de texto de la aplicación inicial .

Busqué en Tasker y después de un par de horas logré obtener una solución cruda pero efectiva utilizando su creador de diálogo rápido (Escenas) con un campo de entrada y un solo botón. Pego el texto acentuado en el campo de entrada, hago clic en el botón y elimina todos los acentos, lo copia al portapapeles y destruye la escena. Para facilitar su uso, lo estoy lanzando desde un acceso directo de Task Cut que se puede agregar a cualquier pantalla de inicio o incluso mejor, desde un portal Swipepad .

Así la solución bruta e intermedia es la siguiente:

  • escriba palabras griegas en mayúsculas autocompletadas en SMS u otra aplicación, seleccione todo, copie
  • sin cambiar de aplicación, deslícese hasta el acceso directo de Task Cut que abre la escena creada
  • pegue en el campo de texto y haga clic en el botón, que elimina los acentos de las vocales mayúsculas, copia nuevamente en el portapapeles y destruye la escena
  • de vuelta en la aplicación inicial, seleccione todo, pegue sobrescribiendo con el texto sin acentuar

Lamentablemente, no es gratuito, ya que requiere la aplicación Tasker de pago. Con suerte, el teclado o al menos las aplicaciones de SMS permitirán esta funcionalidad, o incluso mejor, alguien escribirá el equivalente en una aplicación nativa de Android.

Incluyo a continuación el XML de Tasker que puede usar para importar esto a Tasker, en caso de que lo encuentre útil. Debajo, incluyo otra versión que, al hacer clic en un botón, se obtiene del portapapeles sin necesidad de que el usuario pegue el texto. Ese, sin embargo, requiere root.

<TaskerData sr="" dvi="1" tv="1.3.1m">
<Scene sr="sceneRemove Accents From Greek Uppercase Vowels">
<cdate>1350679378737</cdate>
<edate>1350725381426</edate>
<gridSize>18</gridSize>
<heightLand>-1</heightLand>
<heightPort>362</heightPort>
<nme>Remove Accents From Greek Uppercase Vowels</nme>
<widthLand>-1</widthLand>
<widthPort>384</widthPort>
<EditTextElement sr="elements0">
<flags>4</flags>
<geom>20,20,343,214,-1,-1,-1,-1</geom>
<valueselectedTask>45</valueselectedTask>
<Str sr="arg0" ve="3">TxtUserInput</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="0"/>
<RectElement sr="background">
<flags>4</flags>
<geom>-1,-1,-1,-1,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3"/>
<Int sr="arg1" val="0"/>
<Str sr="arg2" ve="3">#77333333</Str>
<Str sr="arg3" ve="3">#77333333</Str>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3">#FF000000</Str>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</RectElement>
</EditTextElement>
<ButtonElement sr="elements1">
<clickTask>44</clickTask>
<flags>4</flags>
<geom>50,243,288,105,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3">BtnSubmittedText</Str>
<Str sr="arg1" ve="3">Remove accents and copy to clipboard</Str>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Img sr="arg6" ve="2"/>
</ButtonElement>
</Scene>
<Task sr="task44">
<cdate>1350679493963</cdate>
<edate>1350679493963</edate>
<id>44</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">%TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ά</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Α</Str>
</Action>
<Action sr="act10" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Str sr="arg1" ve="3">%TempUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act11" ve="3">
<code>105</code>
<label>Copied to clipboard</label>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>49</code>
<Str sr="arg0" ve="3">Remove Accents From Greek Uppercase Vowels</Str>
</Action>
<Action sr="act2" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Έ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ε</Str>
</Action>
<Action sr="act3" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ή</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Η</Str>
</Action>
<Action sr="act4" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ί</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act5" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϊ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act6" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ό</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ο</Str>
</Action>
<Action sr="act7" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ύ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act8" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϋ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act9" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ώ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ω</Str>
</Action>
</Task>
<Task sr="task45">
<cdate>1350723583443</cdate>
<edate>1350723583443</edate>
<id>45</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtUserInput</Str>
<Str sr="arg1" ve="3">%new_val</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
</Task>
</TaskerData>

Lo siguiente guarda 1 paso (pegar en la escena) pero requiere root:

<TaskerData sr="" dvi="1" tv="1.3.1m">
<Scene sr="sceneRemove (ROOT) Accents From Greek Uppercase Vowels">
<cdate>1350679378737</cdate>
<edate>1350727181786</edate>
<gridSize>18</gridSize>
<heightLand>-1</heightLand>
<heightPort>362</heightPort>
<nme>Remove (ROOT) Accents From Greek Uppercase Vowels</nme>
<widthLand>-1</widthLand>
<widthPort>384</widthPort>
<EditTextElement sr="elements0">
<flags>4</flags>
<geom>20,20,343,214,-1,-1,-1,-1</geom>
<valueselectedTask>46</valueselectedTask>
<Str sr="arg0" ve="3">TxtUserInput</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="0"/>
<RectElement sr="background">
<flags>4</flags>
<geom>-1,-1,-1,-1,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3"/>
<Int sr="arg1" val="0"/>
<Str sr="arg2" ve="3">#77333333</Str>
<Str sr="arg3" ve="3">#77333333</Str>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3">#FF000000</Str>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</RectElement>
</EditTextElement>
<ButtonElement sr="elements1">
<clickTask>47</clickTask>
<flags>4</flags>
<geom>50,243,288,105,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3">BtnSubmittedText</Str>
<Str sr="arg1" ve="3">Remove accents and copy to clipboard</Str>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Img sr="arg6" ve="2"/>
</ButtonElement>
</Scene>
<Task sr="task46">
<cdate>1350723583443</cdate>
<edate>1350723583443</edate>
<id>46</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtUserInput</Str>
<Str sr="arg1" ve="3">%new_val</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
</Task>
<Task sr="task47">
<cdate>1350679493963</cdate>
<edate>1350679493963</edate>
<id>47</id>
<Action sr="act0" ve="3">
<code>51</code>
<Str sr="arg0" ve="3">Remove (ROOT) Accents From Greek Uppercase Vowels</Str>
<Str sr="arg1" ve="3">TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Str sr="arg3" ve="3">%CLIP</Str>
</Action>
<Action sr="act1" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">%TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act10" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ώ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ω</Str>
</Action>
<Action sr="act11" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Str sr="arg1" ve="3">%TempUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>105</code>
<label>Copied to clipboard</label>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act13" ve="3">
<code>49</code>
<Str sr="arg0" ve="3">Remove (ROOT) Accents From Greek Uppercase Vowels</Str>
</Action>
<Action sr="act2" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ά</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Α</Str>
</Action>
<Action sr="act3" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Έ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ε</Str>
</Action>
<Action sr="act4" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ί</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act5" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϊ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act6" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ή</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Η</Str>
</Action>
<Action sr="act7" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ό</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ο</Str>
</Action>
<Action sr="act8" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ύ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act9" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϋ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
</Task>
</TaskerData>

Solo para completar, ¿ha probado el teclado MessagEase ? No sé nada acerca de sus características griegas, pero según sus características en inglés, es bastante probable que te permita escribir lo que quieras la primera vez.