egui icon indicating copy to clipboard operation
egui copied to clipboard

Switching windows with atl+tab inserts tab into textedit

Open mvtec-bergdolll opened this issue 3 years ago • 2 comments

Describe the bug Using egui::TextEdit::multiline inserts a tab each time I alt+tab to another window. No other editor does that.

To Reproduce

  1. Click into TextEdit area write something alt+tab to other application window
  2. Focus egui again with mouse
  3. Notice that it inserted a tab

Expected behavior No tab is inserted

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version eframe 0.16.0 features=["default_fonts", "egui_glow"]

mvtec-bergdolll avatar Apr 21 '22 13:04 mvtec-bergdolll

Same thing with Alt+[number] to switch to a specific tab. It puts the number in the text box.

Titaniumtown avatar Apr 21 '22 18:04 Titaniumtown

Perhaps a proper fix should be made in winit, but until then it should be easy to just ignore WindowEvent::ReceivedCharacter if the character is \t or a number, and alt is pressed. I already have a similar hack for not inserting a C when the user pressed cmd+C to copy text 🙄

emilk avatar Apr 22 '22 07:04 emilk