Quick fix for Window Ctrl charcter handling.
This is needed to allow platform compatibel e_text and e_length, but a lot more work ist needed to unify keyboard handling
This commit is contained in:
parent
f151ecb87b
commit
1ae43956e2
@ -678,7 +678,12 @@ int Fl_Wayland_Screen_Driver::compose(int& del) {
|
|||||||
// letter+modifier key
|
// letter+modifier key
|
||||||
int condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) && ascii < 128 ;
|
int condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) && ascii < 128 ;
|
||||||
// pressing modifier key
|
// pressing modifier key
|
||||||
|
// FL_Shift_L, FL_Shift_R, FL_Control_L, FL_Control_R, FL_Caps_Lock
|
||||||
|
// FL_Meta_L, FL_Meta_R, FL_Alt_L, FL_Alt_R
|
||||||
|
// TODO: FL_Alt_Gr
|
||||||
condition |= (Fl::e_keysym >= FL_Shift_L && Fl::e_keysym <= FL_Alt_R);
|
condition |= (Fl::e_keysym >= FL_Shift_L && Fl::e_keysym <= FL_Alt_R);
|
||||||
|
// FL_Home FL_Left FL_Up FL_Right FL_Down FL_Page_Up FL_Page_Down FL_End
|
||||||
|
// FL_Print FL_Insert FL_Menu FL_Help and more
|
||||||
condition |= (Fl::e_keysym >= FL_Home && Fl::e_keysym <= FL_Help);
|
condition |= (Fl::e_keysym >= FL_Home && Fl::e_keysym <= FL_Help);
|
||||||
condition |= Fl::e_keysym == FL_Tab;
|
condition |= Fl::e_keysym == FL_Tab;
|
||||||
//fprintf(stderr, "compose: condition=%d e_state=%x ascii=%d\n", condition, Fl::e_state, ascii);
|
//fprintf(stderr, "compose: condition=%d e_state=%x ascii=%d\n", condition, Fl::e_state, ascii);
|
||||||
|
@ -332,7 +332,7 @@ void Fl_WinAPI_Screen_Driver::get_system_colors()
|
|||||||
|
|
||||||
int Fl_WinAPI_Screen_Driver::compose(int &del) {
|
int Fl_WinAPI_Screen_Driver::compose(int &del) {
|
||||||
unsigned char ascii = (unsigned char)Fl::e_text[0];
|
unsigned char ascii = (unsigned char)Fl::e_text[0];
|
||||||
int condition = (Fl::e_state & (FL_ALT | FL_META)) && !(ascii & 128) ;
|
int condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) && !(ascii & 128) ;
|
||||||
if (condition) { // this stuff is to be treated as a function key
|
if (condition) { // this stuff is to be treated as a function key
|
||||||
del = 0;
|
del = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user