FTXUI icon indicating copy to clipboard operation
FTXUI copied to clipboard

No option to use keyboard modifiers

Open jdfa opened this issue 4 years ago • 3 comments

Usually keyboard events are handled with keyboard modifiers (Ctrl, Alt, Shilt, their combinations, system specific modifiers). Current keyboard event system doesn't support that, only limited amount of events with Shift modifier can be distinguished.

AFAIK there is no platform independent solution for this, but there are some platform specific ones (GetKeyState for Windows).

P.S. I can provide specialization for Windows platform if there will be specialization for any other platform.

jdfa avatar Mar 28 '21 17:03 jdfa

I don't know. I would love to stay behind the xterm specification and do not introduce platform specific features. I am wondering how softwares like him implement this.

ArthurSonzogni avatar Apr 02 '21 10:04 ArthurSonzogni

I know that in Qt they are having separate enum for keyboard modifiers which is stored as a field in keyboard event. It is being filled by special platform specific handlers. For Linux they are using xkbcommon.

jdfa avatar Apr 02 '21 12:04 jdfa

I would love to maintain "No dependencies" properties on this project, outside of a few libraries guaranteed to be installed on the target OS:

  • <Window.h> on windows
  • <sys/ioctl.h> & <unistd.h> on POSIX systems
  • <emscripten.h> on WebAssembly.

This is a feature quite hard to bring, with several drawback and I don't believe there are too many people interested in. So I don't think I would be happy to develop it.

(Please add a star if you think this feature deserve to be implemented)

ArthurSonzogni avatar Apr 05 '21 08:04 ArthurSonzogni