Draluy / chocoratage

Ecoute des mots cles lies au chocoblastage et verrouille la session des qu'un de ces mots est tape au clavier.
GNU General Public License v3.0
4 stars 2 forks source link

Allow food emojis matching #14

Open fabmars opened 4 years ago

fabmars commented 4 years ago

Those https://en.wikipedia.org/wiki/Supplemental_Symbols_and_Pictographs Range: [U+1F900 - U+1F9FF] And those in particular: 🥐🍫🍪🍩🥞 (UTF-16: \uD83E\uDD50 \uD83C\uDF6B \uD83C\uDF6A \uD83C\uDF69 \uD83E\uDD5E ) Enchancement request spun from https://github.com/Draluy/chocoratage/issues/3

fabmars commented 4 years ago

The instant messaging apps :croissant: form is already covered.

Actually not trivial to implement: like I implied above, each of those emojis are 2 chars in a JVM (chars are 2 bytes, those emojis are 17 bits). And currently the keylogger feeds us with chars directly inferred from the use of the keyboard's actual keys.

IOW to match a croissant emoji, we'd need to match the actual succession of chars {'1', 'F', '9', '5', '0' }. That means we have to take it the other way around and teach the ForbiddenPhrase to detect them.