randy3k/radian

Allow for ctrl bindings in custom keymap

Opened this issue · 1 comments

Seems arbitrary to only allow escape bindings. I've added the following to load_custom_key_bindings

    keymap = roption("radian.key_map", [])
    for m in keymap:
        print('here we go')
        map_key((m["key"],), m["value"], mode=m["mode"] if "mode" in m else "r")

and then in .radian_profile

options(
    radian.key_map = list(
        list(key = "c-o", value = " %>% ")
    ),
    ...

Happy to make a pull request if you'd like to add this functionality!

I am open to this idea. Though I prefer having just radian.ctrl_key_map to keep things not too crazy. Otherwise, there may be questions asking, e.g., how to do ctrl+shift+x or ctrl+alt+y which are unfortunately not possible.