Michael Schmid wrote:

> FLTK version: 1.1.9
>
> I use 'Fl_Input' with 'FL_INPUT_READONLY' set.
> How can I get the character which was really intended to press? With
> event_key() I get only the key pushed on the keyboard (So if I press the
> keys 'Shift & 1' I get '1' by event_key() and not '+' as I wanted (->
> Have a german keyboard)).
> I could decode it in combination with event_state() as far a I
> unterstood, but to be honest I don't want to do this... Is there a
> funktion which can be used to obtain the key intended (For example
> 'Shift & 1' gives '+')? Or has anybody an algorithm which can be used to
> implement this?

On my German keyboard 'Shift & 1' is '!', but that aside, the correct
function to get the translated key = text is Fl::event_text().

Hint: try the keyboard demo test/keyboard.

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to