Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift+Insert to paste text #1541

Closed
tversteeg opened this issue Jan 8, 2018 · 7 comments
Closed

Shift+Insert to paste text #1541

tversteeg opened this issue Jan 8, 2018 · 7 comments

Comments

@tversteeg
Copy link

tversteeg commented Jan 8, 2018

It would be nice to add this in addition to Ctrl+V. And Ctrl+Insert for copying would also be nice since it seems to be a standard as well.

@ocornut
Copy link
Owner

ocornut commented Jan 8, 2018

Interesting, I had never used this shortcut before but it seems to work on Windows at least.
Do you know if it's generally a cross platform thing? Do this differ in any way to CTRL+V ?

@nayyden
Copy link

nayyden commented Jan 8, 2018 via email

@tversteeg
Copy link
Author

tversteeg commented Jan 8, 2018

I use it fairly often since it's configured as a single button on my keyboard.
I haven't tried it on Linux yet, but on Windows it doesn't work; I'm using GLFW and imgui 1.51.

@ocornut
Copy link
Owner

ocornut commented Jan 8, 2018

@nayyden I don't imagine this to a be "Linux" thing but more like a feature of the terminal application you are using?

@tversteeg So we are looking at those:

Ctrl+Insert = Ctrl+C = COPY
Shift+Insert = Ctrl+V = PASTE
Shift+Delete = Ctrl+X = CUT

Until now imgui didn't know about the "Insert" key (it doesn't have a full keyboard layout). I was hoping to wait and add every key later but made an exception and added Insert already (see commit above).

The question is to know if adding those shortcuts to InputText() would be a problem but any user/OS based on their expectation.

@tversteeg
Copy link
Author

These shortcuts seem to generally work on most applications on the OSes I've tried them on--Debian and Windows 10.

ocornut added a commit that referenced this issue Jan 8, 2018
@ocornut
Copy link
Owner

ocornut commented Jan 8, 2018

Added support for those shortcuts now.
Note that you will need to update your binding code to fill in the ImGuiKey_Insert key.

@ocornut ocornut closed this as completed Jan 8, 2018
@OvermindDL1
Copy link

Interesting, I had never used this shortcut before but it seems to work on Windows at least.
Do you know if it's generally a cross platform thing? Do this differ in any way to CTRL+V ?

Just for note, Shift+Insert (and the other Shift+things) were the original Copy/Cut/Paste keys, supported by Windows, mac, unix's basically everywhere on everything. Windows added Ctrl+C/etc... to supplement them in Windows 3 (I remember when it was added ^.^). Shift+etc tend to work more universally than Ctrl+etc overall. :-)

ocornut added a commit that referenced this issue Jun 15, 2018
ocornut added a commit that referenced this issue Jun 15, 2018
…indow (affecting sync of multi-layered docking overlays). This was extremely tricky to find and fix (*). (#1541)

(*) Merely assigning viewport->Pos = pos in UpdateMovingWindow() broke a series of thing because the code that assign viewports and viewport flags relied on moving window leaving its own viewport the first time to set the NoInputs flag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants