atom-script icon indicating copy to clipboard operation
atom-script copied to clipboard

ctrl+shift+b not working for one of my machines

Open DogtorDoggo opened this issue 8 years ago • 6 comments

I had script installed in atom in the past they work perfectly fine but for this new laptop I can't run codes using this hot key combo. I am however able to run my code by selecting packages->script->run script.

DogtorDoggo avatar Aug 25 '16 21:08 DogtorDoggo

Hi. Please, check your keybindings settings. Maybe something in your keybindings.json or some other package overwrites "script" settings.

nixel2007 avatar Aug 25 '16 21:08 nixel2007

Thanks nixel2007 for your help. I looked up keybindings tab in atom settings, and found three entries

ctrl-shift-B native! Core body .native-key-bindings ctrl-shift-B script:run Script .platform-win32 atom-text-editor, .platform-linux atom-text-editor ctrl-shift-B fuzzy-finder:toggle-git-status-finder Fuzzy Finder .platform-win32

I then copied the middle one

'.platform-win32 atom-text-editor, .platform-linux atom-text-editor': 'ctrl-shift-B': 'script:run'

and pasted it into the keymap file to override keybindings. Now I get

ctrl-shift-B native! Core body .native-key-bindings ctrl-shift-B script:run Script .platform-win32 atom-text-editor, .platform-linux atom-text-editor ctrl-shift-B fuzzy-finder:toggle-git-status-finder Fuzzy Finder .platform-win32 ctrl-shift-B script:run User .platform-win32 atom-text-editor, .platform-linux atom-text-editor

when I search for ctrl-shift-B. However I still can't use this hot key to run code. Can you advise what part of it should I look into?

DogtorDoggo avatar Aug 25 '16 22:08 DogtorDoggo

@lqinray sorry, i didn't see this sort of issue before. Maybe @rgbkrk can say something?

Does keybinging work if you run atom through atom --save from console?

nixel2007 avatar Aug 27 '16 13:08 nixel2007

It looks like that native! Core body is taking precedence.

rgbkrk avatar Aug 27 '16 17:08 rgbkrk

@nixel2007 Thanks for the help. I opened console by ctrl+alt+i, and tried to run atom --save. I got the error

VM665:2 Uncaught SyntaxError: Unexpected identifier(…)InjectedScript._evaluateOn @ VM624:878InjectedScript._evaluateAndWrap @ VM624:811InjectedScript.evaluate @ VM624:667

If I type atom in the console I can see a big AtomEnvironment configuration under which there is an entry called keymaps. But it has 474 entries I can't browse through each of them.

When you asked if keybinding works do you mean that I type atom(no enter after this) in the console(which I opened by ctrl+alt+i), and run it by ctrl+shift+b? I tried it but no response. But I am under the impression that I'm missing something here.

@rgbkrk is there any way to change the order that which one comes first? I looked it up but can't find how to do it under settings->keybindings

DogtorDoggo avatar Aug 27 '16 18:08 DogtorDoggo

Inside the keymap.cson file , that opens when using File>Keymap... , try using the 'atom-text-editor': section for your custom keys, instead of the 'atom-workspace': section, if you want to use the keys when the editor window frame is in focus.

e.g.:

'atom-text-editor': 'alt-down': 'editor:scroll-down-without-moving-cursor'

instead of

'atom-workspace': 'alt-down': 'editor:scroll-down-without-moving-cursor'

backforeground avatar Jun 22 '22 11:06 backforeground