mochizukikotaro / print-code

MIT License
10 stars 0 forks source link

custom key map not triggering #14

Closed jm3 closed 6 years ago

jm3 commented 6 years ago

Hi! The README says that the default key-mapping to print is cmd-shift-p (macOS), but on latest Atom MacOS, cmd-shift-p is already defined as the Command Palette (command-palette:toggle) mapping. I see the setting to enable cmd-3 / cmd-4 as alternate key-mappings, but I would prefer to use a custom keymap of 'alt-cmd-p', since P = "print" is easy to remember.

In my keymap.cson, I've tried:

 'atom-workspace':
  'alt-cmd-p': 'code-print:print'

 'atom-text-editor':
    'alt-cmd-p': 'code-print:print'

 'atom-workspace atom-text-editor':
  'alt-cmd-p': 'code-print:print'

But nothing seems to work. What scope should I be using to trigger code-print from a different key?

mochizukikotaro commented 6 years ago

@jm3 Please use print-code, not code-print.

Probably it will work.

// NG
 'atom-text-editor':
    'alt-cmd-p': 'code-print:print'

// OK
 'atom-text-editor':
    'alt-cmd-p': 'print-code:print'
jm3 commented 6 years ago

oops i'm sorry! 🙇 you're right, thank you.