andlabs / libui

Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
Other
10.73k stars 616 forks source link

Master issue for missing features in uiArea #329

Open andlabs opened 6 years ago

andlabs commented 6 years ago

Merging a bunch of issues here.

mischnic commented 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)?

andlabs commented 6 years ago

It should, yes.

msink commented 6 years ago

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.

mischnic commented 6 years ago
AndyObtiva commented 3 years ago

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.