Author Topic: Text Input Help  (Read 1287 times)

OpenSkrillux (OP)

Text Input Help
« on: May 15, 2013, 04:54:53 pm »
Hey all! I'm trying to write a text editor for the Dingoo in c++ that uses button combinations to enter characters. I started studying c++ a few weeks ago and it's been going well, but now I'd like to take it on the road! I'm not sure how to get the correct input on the Dingoo for the editor though.

I have been using ncurses to make simple text-based games like snake for it so far, but I'm not sure how i would process holding space (X) while holding left control (A) and pressing left to type a symbol. I'm using a gap buffer implementation from http://www.lazyhacker.com/gapbuffer/gapbuffer.htm for the text, so that seems ok. Searching on the web I found this stackoverflow post suggesting that I need to enter a raw keyboard mode. Is this necessary, or are there other ways of getting press and release events for these buttons?

On another related idea, how does OpenDingux read the buttons and turn them into keyboard keys? I'm reading the linuxjournal article linked from the stackoverflow post, and I'm not sure where or what to look up to get a better understanding of Linux programming. In the end, I'd like to make something like the power switch daemon would allow typing into other programs like Dosbox.

Thanks!