Make Slack behave like the Telegram Desktop app

This will help you remap some Slack keyboard commands so that Command + Enter sends a message and Enter creates a new line… for OSX.

I think this makes way more sense than using Command Enter to “create a new snippet”.

I use the Telegram Desktop app a lot – so accidentally creating snippets in Slack all the time was a bit painful.

You’ll need to install Karabiner and load the private.xml file below…

<?xml version="1.0"?>
<root>
    
    <appdef>
        <appname>SLACK</appname>
        <equal>com.tinyspeck.slackmacgap</equal>
    </appdef>
    
    <item>
        <name>Slack Customisation</name>
        <item>
            <name>Map Cmd+Enter to send, Enter to extra line</name>
            <identifier>remap.app_slack_cmd_enter</identifier>
            <only>SLACK</only>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN, ModifierFlag::COMMAND_L,
                KeyCode::RETURN
            </autogen>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN,
                KeyCode::RETURN, ModifierFlag::SHIFT_L
            </autogen>
        </item>
    </item>
    
</root>

and just for fun, OSX Messages app…

    <appdef>
        <appname>Messages</appname>
        <equal>com.apple.iChat</equal>
    </appdef>

    <item>
        <name>OSX Messages Customisation</name>
        <item>
            <name>Map Enter to extra line</name>
            <identifier>remap.app_messages_cmd_enter</identifier>
            <only>Messages</only>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN, ModifierFlag::COMMAND_L,
                KeyCode::RETURN
            </autogen>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN,
                KeyCode::RETURN, ModifierFlag::OPTION_L
            </autogen>
        </item>
    </item>

and Skype…

     <item>
        <name>Skype Customisation</name>
        <item>
            <name>Map Enter to extra line</name>
            <identifier>remap.app_skype_cmd_enter</identifier>
            <only>Skype</only>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN, ModifierFlag::COMMAND_L,
                KeyCode::RETURN
            </autogen>
            <autogen>
                __KeyToKey__
                KeyCode::RETURN,
                KeyCode::RETURN, ModifierFlag::SHIFT_L
            </autogen>
        </item>
    </item>

1 thought on “Make Slack behave like the Telegram Desktop app

Comments are closed.