Low level keyboard mapping and unicode in GTK/GTKmm



I'm asked by a friend to develop an antique greek teaching system that can run on both Linux and Windows. Though I'm using GTKmm it would seem a problem that this list should cover.
 
My problem is this: I would like to make an artificial mapping of keypresses so I can control how special glyphs are mapped or even make it user customizable. For instance the keypresses:
 
' - \ shift+a    should map to an upper-case eta-character with a iota-subscriptum, a spiritus lenis and a gravis accent. That character can be found at unicode: 1F92
 
PROBLEMS...
o)    I would like to extend a regular Entry widget so I save myself the fuzz of making cursormovements etc.
o)    I should be able to intercept keypresses and either 1) record a ligature keypress, which isn't sent to the widget but withheld until later, or 2) emit a unicode character which is a compound of of the ligatures + base character
o)    If I intercept on_key_press_event I can record keypresses, like this:
 
 if (event->keyval>=128)
  return this->Gtk::Entry :: on_key_press_event(event);
// do mapping stuff
// if a key is ready to be printed, put it's unicode value in event->keyval and call a...
 return this->Gtk::Entry :: on_key_press_event(event);
      but it would seem that the Entry widget doesn't respond to this, which would make sense, since it probably reacts upon keyboard-keycodes and not mapped chars
 
OR...
o)    I should be able to specify how keypresses are mapped to chars through some obscure input-control-mechanism. I'm not that advanced yet though..
 
Any suggestions are very welcome
 
Regards
Rene Jensen / Denmark
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]