J.R.R. Tolkien's Tengwar writing system, primarily used for writing the Quenya ("high elvish") conlang, maps shapes to sounds so that it can be read in a systematic fashion. This means it is typically presented in a table, of similar dimensions to a a TI-84+ keypad.

Vowels are typically written as combining marks:


I have written a program for OSX that allows you to remap the input from individual keyboards (on a multi-keyboard system) and combined it with a calculator-side program that uses the builtin SmartPad HID drivers to good effect:



The system is thus far limited as I only support the primary portion of the table (upper 4 x 6), and short vowels, but not the standalone vowel carriers, long vowels, more exotic consonants, punctuation, or numbers. I plan to support these relatively soon, but need to improve both applications first. Anyway, if you have a modern Mac and an 84+ and want to try it, you can get it here.
This is pretty neat. I'm not into elvish, but my sister is, so I'll show this to her. Does the calc act like a normal keyboard without the Mac program running?
Approximately. It's still just using GetCSC, so no multi-keypress detection, which means shift and control don't work as expected. At the moment, it's setup similarly to the jsTIfied key mappings, but that will probably evolve slightly in future versions. I've already switched a few keys around (Clear is backspace, Vars is /).
elfprince13 wrote:
Approximately. It's still just using GetCSC, so no multi-keypress detection, which means shift and control don't work as expected. At the moment, it's setup similarly to the jsTIfied key mappings, but that will probably evolve slightly in future versions. I've already switched a few keys around (Clear is backspace, Vars is /).


So the magic is in the Mac program?
Yeah. The HID Keyboard/Keypad spec doesn't have any way of specifying unicode characters (so the calculator code can't help). And unfortunately, at least on OS X, the layer of the UI event system that is Unicode-aware has already forgotten which keyboard an input event came from. So I have to tap events at both the USB level and the UI level, and match them against each other to figure out which ones to modify.
elfprince13 wrote:
Yeah. The HID Keyboard/Keypad spec doesn't have any way of specifying unicode characters (so the calculator code can't help). And unfortunately, at least on OS X, the layer of the UI event system that is Unicode-aware has already forgotten which keyboard an input event came from. So I have to tap events at both the USB level and the UI level, and match them against each other to figure out which ones to modify.


Neat. Could this technique be useful in other applications as well?
Ivoah wrote:
elfprince13 wrote:
Yeah. The HID Keyboard/Keypad spec doesn't have any way of specifying unicode characters (so the calculator code can't help). And unfortunately, at least on OS X, the layer of the UI event system that is Unicode-aware has already forgotten which keyboard an input event came from. So I have to tap events at both the USB level and the UI level, and match them against each other to figure out which ones to modify.


Neat. Could this technique be useful in other applications as well?


Absolutely. Notice the UI in the menu bar near the beginning of the video. I already allow you to choose which keyboards you want to apply the remapping to, the 84+ just happens to be particularly well suited because of the vertical layout.

[edit]

The relevant APIs are the HID Manager, a part of IOKit which allows you to write user-space programs that access low level USB HID devices, and the Quartz Event Services, which allows you to manipulate the UI-level event stream. Plus you need to prompt for trusted access to be added to the whitelist for Accessibility Services.
I am making a TI-84+CSE program for the tengwar, it isnt a font though
Can you elaborate on what you mean by this?
elfprince13 wrote:
Can you elaborate on what you mean by this?


Super duper necro post, but I was making a tengwar reference program for the CSE that basically just displayed all of the letters and their corresponding characters. I might make a translator program for the CE that can convert from english to the tengwar and vice-versa
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement