Write a Unicode input method ***BONUS***
completed by: :Puckipedia
mentors: mmu_man, Adrien Destugues - PulkoMandy, Jerome Duval
The goal is to write an input method that allows entering characters by typing their Unicode hexadecimal code.
You'll need to:
- Write an input method skeleton (you can check the unfinished ones in Haiku and the working Canna source code)
- Parse the input:
- check that each typed character is a hexadecimal digit
- append it to a string and parse it as hexadecimal
- On Enter and/or after a timeout, validate the proposed Unicode (not all hexadecimal codes are allowed, you'll probably need to use an ICU API for this, possibly u_charType())
- Send the resulting character to the application using the input method protocol
Handling the input method activation via a shortcut can be left out for now as input_server currently only supports enabling the selected input method but not an arbitrary one on a specific shortcut yet.
References:
https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input
https://www.haiku-os.org/legacy-docs/bebook/BInputServerMethod_Overview.html
http://cgit.haiku-os.org/haiku/tree/src/add-ons/input_server/methods
https://github.com/mt819/CannaIM
http://icu-project.org/apiref/icu4c/uchar_8h.html