Sublime Forum

Ubuntu 17.04 Switching view to 2 columns with alt+shift+2 not working

#3

I typed the command but I didn’t get any output

0 Likes

#4

Open you user keys file .sublime-keymap and add this:

    {
        "keys": ["alt+shift+1"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1]]
        }
    },
    {
        "keys": ["alt+shift+2"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 0.5, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
        }
    },
0 Likes

#5

did that already but no luck also removed sublime and reinstalled still the same

0 Likes

#6

If you use the menu, it does work?

0 Likes

#7

yes it does

0 Likes

#8

Backup all your settings and revert Sublime Text to a clean state and test if it is
working. It should, then start installing your settings until you find out what is breaking it.

Some useful links:

  1. Complete clean install proceedings
  2. Reverting to a clean state (backup your data)
0 Likes

#9

i deleted all packages and settings.I installed only package controll but still the same

0 Likes

#10

Did you followed the procedures on: http://www.sublimetext.com/docs/3/revert.html?
If yes, then it is a bug on the Sublime Text core. You should open a bug report on:

  1. https://github.com/SublimeTextIssues/Core/issues
0 Likes

#11

I will do it

0 Likes

#12

its not necessarily a bug, your window manger or some other application could be eating the keyboard event before it gets to ST - you should check that first

3 Likes

#13

how can I check that?

0 Likes

#14

Put this on your settings file, binding the keys to another combination available:

    {
        "keys": ["alt+shift+1"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1]]
        }
    },
    {
        "keys": ["alt+shift+2"],
        "command": "set_layout",
        "args":
        {
            "cols": [0.0, 0.5, 1.0],
            "rows": [0.0, 1.0],
            "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
        }
    },

It should work some some key binding not registered by Sublime Text, and any other Mac application.

Later, you can search for some application for Mac which detects which key combinations are registered by some application.

0 Likes

#15

I don’t use mac I use ubuntu

0 Likes

#16

Also do I put that into key bindings of user.sublime-keymap?

0 Likes

#17

Yes, you put them on file from this menu:

0 Likes

#18

I think that Ubuntu uses this shortcut to switch between languages, so the shortcut never makes it to sublime. Go to keyboard settings and change the key combination to toggle layouts amd maybe it will work.

2 Likes

#19

You are correct, I had this issue as well on 17.04 and 17.10 and tested your suggestion by changing the combination used to change keyboard layout and it works. It didn’t use to happen until 17.04 though, so I wonder what changed.

1 Like

#20

Apparently ubuntu 17.04 & 17.10 are affected by this bug:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1683383

basically, the keyboard shortcut is fired on press and not on release, so considering you have keyboard layout configured for Alt + Shift no keyboard shortcut which uses Alt +Shift + <anything> would ever fire… I’ll subscribe to that bug report in hopes that someone would post instructions on how to patch 17.10.

0 Likes

#21

I have same problem, but on Windows. Nothing was helpful so far. How to fix this?

0 Likes

#22

Run this command on your Sublime Text console and monitor how it respond to your keypresses:

sublime.log_input(True); sublime.log_commands(True);

Then, close/kill your other Windows applications and test whether Sublime Access the keys.

Alternatively, you can also run Sublime Text on Administrator mode, which should give him a greater level of exclusivity with your keyboard. You can read more about this on:

0 Likes