Open andlabs opened 6 years ago
but this must be clearly marked as only for the purposes of user interaction, NOT FOR TEXT INPUT (and I have to remember a good reason why; TODO)
Would shift + a key be properly parsed as well (e.g. capital letters, punctuation mark)?
It should, yes.
On Linux if Area set as direct child of Window - it is 1 pixel width, on Windows - fills entire Window.
Well, sorry, there already is #207 for this issue.
I noticed that when hooking a key event to area, and I press shift+1 to produce '!', the key value I receive from area key event is that of number 1 (49), not the '!' key value (33) produced by shift+1. This means that in order for me to recognize what character the user intended, I would have to access the current keyboard layout and perform a conversion, which is not something that is typically available in Ruby as far as I know. I think this must be done automatically by libui, giving me the key value for '!' not 1 when I press shift+1.
The SWT library handles this by offering an additional attribute "character" in its key event, which in the case of the example above is the calculated character from holding shift and pressing a key (they still provide the standard key value as well, meaning for shift+1, I get key value as 49 and character as 33 in SWT)
This would be great to add to facilitate fully manual manipulation of user key input should I want to build a string from user input.
Thanks.
Merging a bunch of issues here.
Key
will still be'f'
but this new field would be'u'
) — but this must be clearly marked as only for the purposes of user interaction, NOT FOR TEXT INPUT (and I have to remember a good reason why; TODO)