gh-38066: IDLE: Dedenting with shift+tab#2210
Conversation
|
This would be really useful, since I use IDLE a lot when I wanna do something fast, and indentation is so important. The other keyboard shortcut doesnt really work on my layout |
|
Bumping this PR. Very nice feature, implementation seems good, someone should build to double check. |
| smart-backspace=<Key-BackSpace> | ||
| newline-and-indent=<Key-Return> <Key-KP_Enter> | ||
| smart-indent=<Key-Tab> | ||
| smart-dedent=<Shift-ISO_Left_Tab> |
There was a problem hiding this comment.
@StanFromIreland
I found ISO keysyms on https://www.tcl-lang.org/man/tcl8.6/TkCmd/keysyms.htm.
Unknown to me and likely new in 8.6. Are these a linux (unix) thing? Would 'tab' really not work?
In any case, 'Key' for the event should still be needed before the keysym.
| smart-dedent=<Shift-ISO_Left_Tab> | |
| smart-dedent=<Shift-Key-ISO_Left_Tab> |
Repeat twice below.
There was a problem hiding this comment.
They are not a tk thing, but an X11 thing.
I tested, and just smart-dedent=<Shift-Key-Tab> does not work.
On my system it is actually not necessary to have Key- (but it is best to have it anyway IMO). Secondly, ISO_Left_Tab implies Shift, although IIRC this is not always the case and causes problems with some apps.
|
I added comments to issue about what I think ShiftTab should do. I will manually what it does do, on Windows, tomorrow. Stan, can you try it on Linux? |
|
The current implementation is broken, whenever I try to dedent I get: |
Correct function name. Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
|
This PR is stale because it has been open for 30 days with no activity. |
|
Bump |
Uh oh!
There was an error while loading. Please reload this page.