Text edit hotkeys issue

Hi, some parts of hotkeys in the text edits mentioned in the Demo do not work for me:

  • Hold SHIFT or mouse to select text - works
  • CTRL+Left/Right to word jump - doesn’t work
  • CTRL+A or double click to select all - only double click works
  • CTRL+X, CTRL+C, CTRL+V to use clipboard - none works
  • CTRL+Z, CTRL+Y - doesn’t work
  • ESCAPE to revert - works
  • You can apply arithmetic operators +,*,/ on numerical values - not sure how to do it

Also, this is on Linux system with Cinnamon DE.
Is this a known issue or I have a problem in my setup? Thanks!

Which back-end? Use the demo window to inspect the inputs that imgui is receiving…
Is the CTRL key received? are the A/C/V keys (not characters) received? etc…
Your back-end is probably not passing them correctly to imgui somehow…

The backend I’m using is OpenGL3 with GLFW, what I found is I swapped CTRL key with Caps Lock so on Demo app it does not detect CTRL at all (it’s mapped on language change) and Caps Lock is detected as just a code 280 without a modifier, that’s why the combinations didn’t work.

I swapped CTRL key with Caps Lock

How did you do that swap?
Is there something we can do imgui-side to fix it?

In the keyboard settings: Screenshot%20from%202019-05-29%2015-52-13

Which I think is the same as setxkbmap -option ctrl:nocaps, which is a way the X Windows system does it. I don’t know much about this and how imgui works with keyboard here, no idea if this can be handled :slight_smile:

Another thing I’m wondering is a right-click menu on a text field duplicating those select all, copy, cut, undo/redo, is it possible to have it?

Well I don’t know either, you’ll have to look at the code and figure it out.

It could be possible but it could conflict with users own context menu so we’d need a way around that.