# Keymap.cson Not Visible

**URL:** https://discourse.julialang.org/t/keymap-cson-not-visible/5510
**Category:** New to Julia
**Tags:** juno
**Created:** [August 22, 2017, 4:43pm UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510 "2017-08-22T16:43:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Davo36](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Davo36](https://discourse.julialang.org/u/Davo36)
#### Post date: [August 22, 2017, 4:43pm UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510/1 "2017-08-22T16:43:47Z")

</div>

Hi guys, I have installed Juno, with Julia 0.6. I really like it, thanks to all involved.

I’ve been playing around and one thing I like to do when I’m in other IDE’s is press one key to save my script and run it at the same time. I’d like this key to be F5.

So from here:[http://docs.junolab.org/latest/man/basic\_usage.html#Adding-Your-Own-Shortcuts-1](http://docs.junolab.org/latest/man/basic_usage.html#Adding-Your-Own-Shortcuts-1) I see that I am to edit the keymap.cson file. But it’s not in the location specified in that article, nor is it on my machine.

Should I just create it in the .Atom folder? And then add a few lines to it as suggested in that article, restart and bingo?

I don’t want to create it and find out it’s the wrong thing to do.

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [August 22, 2017, 5:44pm UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510/2 "2017-08-22T17:44:37Z")

</div>

Just use `Ctrl-Shift-P` or `Cmd-Shift-P` to open the command pane and type in “keymap”. The first entry there should get your keymap file, which might also be json in newer Atom versions (not sure).

---

<div class="post-metadata">

### Author: ![Davo36](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Davo36](https://discourse.julialang.org/u/Davo36)
#### Post date: [August 23, 2017, 2:53am UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510/3 "2017-08-23T02:53:23Z")

</div>

Hi thanks, this has gotten me part of the way there.

I opened the keymap.cson file (it is a cson file) and added the following code:

‘.platform-win32 .item-views \> atom-text-editor[data-grammar=“source julia”]’:  
‘ctrl-shift-alt-enter’: ‘julia-client:clear-console-and-run-file’

And in my init.coffee file:

‘.platform-win32 .item-views \> atom-text-editor[data-grammar=“source julia”]’:  
‘f5’: ‘julia-client:clear-console-and-run-file’

Just as per that article I linked to above. And this works in that it clears the console and runs the file. But what I really want is for it to save the file just before running too. All with the f5 key.

Is this doable?

EDIT: I just saw this page: [Keymaps In-Depth](http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/)

Man, I don’t really want to spend half a day learning how to drive Atom. It seems overly complicated and like a ‘black box’ in that there’s no list of available commands, few examples of syntax etc.

I can see that Atom probably can be configured to do anything. But how to get it to do what you want seems akin to learning another small language.

Any help appreciated.

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [August 23, 2017, 8:43am UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510/4 "2017-08-23T08:43:43Z")

</div>

```julia
atom.packages.onDidActivatePackage (p) ->
  if p.name is 'julia-client'
    juno = p.mainModule

    atom.commands.add '.item-views > atom-text-editor', 'julia-client:clear-console-and-run-file', ->
      atom.workspace.getActiveTextEditor().save()
      juno.runtime.evaluation.evalAll()
      juno.runtime.console.reset()

```

in your `init.coffee` should work in most cases (but error for `Untitled` buffers). Note however that there is no need to save files before evaluating them. Atom will also keep a copy of unsaved files if close it, so it’s pretty hard to lose progress.

See [here](https://atom.io/docs/api/v1.19.3/AtomEnvironment) should you want to have look into the available API a bit more in-depth.

Also, please escape code blocks in your posts with backticks (``` for codeblocks, ` for inline code) – makes it much easier on the eyes.

---

<div class="post-metadata">

### Author: ![Davo36](https://avatars.discourse-cdn.com/v4/letter/d/91b2a8/32.png) [@Davo36](https://discourse.julialang.org/u/Davo36)
#### Post date: [August 23, 2017, 9:52am UTC](https://discourse.julialang.org/t/keymap-cson-not-visible/5510/5 "2017-08-23T09:52:08Z")

</div>

Thanks very much.
