Having trouble editing key bindings for sidebar

46 views
Skip to first unread message

Dave Yarwood

unread,
Apr 3, 2015, 9:20:13 AM4/3/15
to light-table...@googlegroups.com
Hi,

I'm working on writing a plugin to bring aoeui key bindings to Light Table. aoeui uses a lot of ^Space modifiers, so I need to remap show/hide command bar to something else -- I've chosen ^Space^Enter.

I was able to disable ^Space from the editor and replace it with ^Space^Enter by adding this to the keymap:

 [:editor "ctrl-space"]
 [:editor "ctrl-space-enter" :show-commandbar-transient]

However, ^Space still closes the sidebar once it's open. I'd like to replace it with ^Space^Enter for consistency. This doesn't seem to have any effect:

 [:sidebar.command "ctrl-space"]
 [:sidebar.command "ctrl-space-enter" :close-sidebar]

^Space is not disabled like I expected. 

Interestingly, I was able to disable ^Space globally by adding [:app "ctrl-space"] to the keymap, but then I couldn't seem to add any key bindings to the command bar. Which makes me wonder if :sidebar.command might not actually correspond to the command bar? It's also possible that :close-sidebar isn't the command I want, but I'm not seeing any other way to close the command bar.

Is there something that I'm missing?

Thanks,
Dave

Justin

unread,
Apr 4, 2015, 12:04:05 PM4/4/15
to light-table...@googlegroups.com
This worked for me 

[:app  "alt-e" :close-sidebar]
   ^      ^       ^....Command
    |     |
    |      `Key Binding
     ` When keybinding is active
   
 

Justin Taft

unread,
Apr 4, 2015, 12:17:25 PM4/4/15
to light-table...@googlegroups.com
To get the binding you want, try
[:app "-ctrl-space" :show-commandbar-transient]
 [:app  "ctrl-space-enter" :show-commandbar-transient]

https://github.com/LightTable/LightTable/blob/4415c8ba855fee40fda6de5e82c64ec131de352a/deploy/settings/default/default.keymap#L3

Dave Yarwood

unread,
Apr 4, 2015, 6:30:30 PM4/4/15
to light-table...@googlegroups.com
Perfect -- this does exactly what I want. Thanks!

--
You received this message because you are subscribed to a topic in the Google Groups "Light Table Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/light-table-discussion/ZbxJxOKePGU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to light-table-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages