Hirse / brackets-beautify

Brackets Extension to beautify JavaScript, HTML, and CSS files.
MIT License
34 stars 3 forks source link

Ctrl-Shift-L On Linux #2

Closed Hippyjake closed 9 years ago

Hippyjake commented 9 years ago

On Linux I can not use the keyboard shortcut. If I remember right, long ago. The original allowed for this but has not for some time. Its also bork in other ways, but you know that ;) So far your fork has fixed all the issues I have had, save the keyboard shortcut. Anything I can do to help Ill jump right in!

Hirse commented 9 years ago

I am on Windows (at least for now) so I didn't test other OS.

I have made a change right now, please have a look if that fixes it for you. If not, please check the Developer Tools Console for any KeyBinding errors.

Hippyjake commented 9 years ago

After some testing I assume the fix works, but is conflicting with "split section into lines" in the edit menu. This is a default keybinding. The stable version does not throw the conflicting error.

Thanks for your quick response.

Hirse commented 9 years ago

On Windows that is Ctrl+Alt+L, so there is no conflict for me. Should I use a different key binding for Linux then?

Hippyjake commented 9 years ago

And the winning combo is

    var keyBindings = [
        {
            key: 'Ctrl-Shift-L',
            platform: 'win'
        }, {
            key: 'Cmd-Shift-L',
            platform: 'mac'
        }, {
            key: 'Ctrl-Alt-L'
        }
    ];

Thank you!

Hippyjake commented 9 years ago

On second thought. I just hope that wont lock peoples desktop sessions, some might. "Ctrl-Alt-B" Might be a good alternative

Hirse commented 9 years ago

Yes, that seems to be the case. I think I will go with

var keyBindings = [
        {
            key: 'Ctrl-Shift-L',
            platform: 'win'
        }, {
            key: 'Ctrl-Alt-B',
            platform: 'win'
        }, {
            key: 'Cmd-Shift-L',
            platform: 'mac'
        }, {
            key: 'Ctrl-Alt-B'
        }
    ];

for now, therefore giving Windows user the choice.

And finally, you could still overwrite that in your user-key-mapping.

Hippyjake commented 9 years ago

Awesome thank you so much!

Hirse commented 9 years ago

I have released a new version, could you make sure it works for you?

Hippyjake commented 9 years ago

All good here