FLTK logo

Re: [fltk.general] Re: Handling composed key for international text

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: Handling composed key for international text Manolo 23:09 Aug 22  
 
You are right Gonzalo, my previous post was inadequate.

Instructions given by the documentation of Fl::compose(int&) apply to the situation
where one creates a new widget that inputs text and wants to support dead keys,
composed characters, and even complex input methods such as those used for CJK.

But what you're asking is more: give text input support to a new FLTK platform.

I recommend you don't code something that would tie together the Vulkan code and your new 
text input widget, and rather work on two fronts:
1) give full text input support to the Vulkan platform;
2) have your text input widget call Fl::compose(), Fl::compose_reset(), fl_set_spot() and fl_reset_spot()
as described in the documentation.
With this, Vulkan should support all sorts of text input in Fl_Input, Fl_Text_Editor and your new widget.

There's no real documentation of what to do on front 1), only comments here and there
in platform-specific code. You may find inspiration in what Wayland does dealing with variables
Fl::compose_state and Fl_Wayland_Screen_Driver::next_marked_length in file Fl_Wayland_Screen_Driver.cxx.
Thus, you would have to implement these member functions:
- Fl_Vulkan_Screen_Driver::compose(int& del)
- Fl_Vulkan_Screen_Driver::compose_reset() 
- Fl_Vulkan_Screen_Driver::reset_spot()
- the Vulkan equivalent of wl_keyboard_key() that runs each time a key is pressed or released.
I also recommend you to use the xkb library that interfaces very cleanly a client program to
keyboard input operations.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/f8cd907f-76ff-4ffd-b65e-316511b9d884n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.