-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow tabs for indentation in text edit widget #73
Comments
Egui uses the tab key to move focus between TextEdit widgets. You can try it in the web demo by clicking the "Hello World!" text edit field and pressing tab. The focus will move to the next field. What do are you trying to accomplish? Do you have a text edit field where you would like the Tab key to insert a |
Exactly that ... I use a customized TextEdit widget for a (toy) code editor ... having the tab key would be somewhat essential for that ... |
Hello. I just created this draft PR #246. How should I render the
I'm still investigating how the font rendering is done, but I decided to create this draft PR to be able to get some early reviews, suggestions and hints. |
I kept hammering at the tabs as space idea, where a With this commit, 94c1801, I took the approach of keeping Now onto the problem I have no idea how to fix. When I detect a After work I will play a bit more with it. |
I'm back the only thing left to do is to actually render This commit has more details: ba12f9e |
The simplest approach is to always use the Then the only thing left is handling the focus issue. I think your |
That moment when I am... damn that's so easy :). I will rebase with your changes and update the PR. For me on Fedora, but on Windows too, On Fedora, I'll try to figure out how it is done. |
Found it for VS Code, |
Maybe we can keep it simple for now. I think the "tab-as-character" behavior should be opt-in, i.e. In most cases I think we would want tab/shift-tab to move focus even for multiline text (as in: most multiline text field do not need tab characters), so the locking-in is much less of an issue. A user can always press ESC to escape the locked in editing. |
Hi,
it seems like the Tab key is not captured in the text edit widget, could that be ?
Like, when I put some debug output in the event handling loop, it seems like there's no event emitted at all ... just the outer frame flickers ...
Is there a way to capture the tab key ?
Best,
N
The text was updated successfully, but these errors were encountered: