Sublime Forum

Keybinds not working

#1

So I have been using sublime on Linux for some time, but while switching to windows, I was disappointed to notice that the column select using shift+alt+up, and my custom bind to scroll using alt+up wasn’t working.

I looked around a little on the forums already and I know that sublime is receiving my keys in the console just fine, but even with what I have below as the only thing in my custom keybinds, sublime still won’t let me use any custom keybinds.

[
	{ "keys": ["alt+up"], "command": "scroll_lines", "args": {"amount": 5.0 } },
	{ "keys": ["alt+down"], "command": "scroll_lines", "args": {"amount": -5.0 } },
]

I have tried this now on two computer running windows 10 V_1607 Build 14393.693. I have pro on my desktop and home on my laptop, but still nothing changes. If anyone has any ideas, I would be up to try almost anything. Thanks!

0 Likes

LaTeX Sublime completions problem after update
#2

Those bindings work fine for me here (using WIndows 7). Silly question time; did you put them into the Default (Windows).sublime-keymap file when you copied them from the Linux box you had them in or did you by chance just copy the Linux file over and forget to rename it?

Indeed Linux defaults the bindings for select_lines to Alt+Shift+Up and Alt+Shift+Down while windows uses Alt+Ctrl+Up and Alt+Ctrl+Down instead. You can copy the default Linux bindings to your custom config to enable them, though:

	{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
	{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
3 Likes

#3

Perfectly fine question considering I didn’t specify!! However; yes, I did already check that, I had actually messed that up when I first moved machines with sublime and couldn’t figure it out. But I do have those two commands in Default (Windows).sublime-keymap, this is the one that shows up on the right panel for me when I click the key bindings button in the menu.

Could there be a problem with what packages I have installed? I ask instead of trying as some of them are customized (Theme) and would prefer not to spend that time again.

Thank you for the quick response and the help in general!

0 Likes

#4

That is entirely possible, except that themes usually don’t provide key bindings so you won’t have to worry about that.

Enter sublime.log_commands(True); sublime.log_input(True) in its console (View → Show Console), try using the bindings you defined and paste the logging output here.

0 Likes

#5

The only response I’m getting in sublime is key evt: alt+up or the various different comamnds that I’ve tried. When using something like ctrl+p, it does show the correct menu command in the console though. It almost seems like sublime just isn’t reading the file.

0 Likes

#6

That’s quite odd. The only things I can think of that would stop sublime from loading the file are:

  1. The filename is wrong (typo in name or not the right platform) but you already checked that
  2. The file is not stored in your User package, which seems doubtful
  3. The format of the file is not valid JSON, but if that was the case you would get an error while it was loading.
0 Likes

#7

That’s kinda why I figured maybe someone had seem something like this before. I’m going to try and completely uninstall and re-install everything tomorrow. I will try it without plugins enabled, maybe it is something with the User file that since it was copied between machines just isn’t working correctly. I will do this and get back with a result! Thanks for helping though!

0 Likes

#8

This morning I removed everything. With a completely fresh install and after deleting the appdata, the keybinding does work. I’m going to start adding packages slowly and continuously track if the bind works while doing so.

I have finished installed most of the packages that I’m used to, and although I did have to redo all my settings, it was successful in fixing the problem. I feel like it was most likely an error from one of the packages that I transferred between machines.

0 Likes

#9

Glad things are resolved! At least, for now… :wink:

0 Likes