# Shortcut to change layer/add via whilst routing in Eagle

I am working on a board which requires a lot of vias and changes of layer whilst routing. I can change layer with the dropdown but that's going to take ages when I've got in excess of 64 vias to do.

How do I assign a shortcut that changes from layer 1 to 16 / 16 to 1? I've assigned a simple 'change layer' but all that does is bring up a 'select layer' window which is just as slow.

Thanks

• Try "change layer <layer number>", e.g. "change layer 1" to jump to the top. – Tom Carpenter Apr 28 '17 at 17:05
• You can assign commands to shortcuts in the editor preferences – Tom Carpenter Apr 28 '17 at 17:07
• OK, that works but it won't add a via, it just stops me routing and then switches layers. – Archie Roques Apr 28 '17 at 17:11
• Ah, wait, try without the "change" - e.g. layer 1. That works for me (adds the via), but only when using the "route" tool. – Tom Carpenter Apr 28 '17 at 18:17
• Sorted! Thanks. If you put it as an answer I'll mark it as the right one – Archie Roques Apr 28 '17 at 21:12

This is certainly possible in Eagle using commands.

When using the route tool, the following command will instruct eagle to change layers:

layer <layerNum>


Where <layerNum> is the layer you want to be on. If you are currently in the process of routing a trace, Eagle will switch to the new layer at the last point that you clicked and add a via at that location.

If you are using the wire tool, eagle will change layer but it will not add a via when it changes the layer.

It is also possible to assign shortcut keys to perform this action. If you select Options->Assign... from the menu in the board editor you can then create a new shortcut.

Select a key + modifier (e.g. Ctrl+1), then as the assigned command, enter the layer command (e.g. layer 1). Ok that to create a shortcut.

Now when routing the trace with the route tool, simply press the keyboard shortcut you created and the trace will jump to that layer.

So, a much simpler way to do this while routing in Eagle is to just press the scroll wheel down on your mouse.
This changes your routing layer and adds a via that you've already specified the size and shape of.
This does not require any additional programming or commands, and you can do it one handed, leaving the other hand freed up for other activities.

Similarly, the right click changes the angle of your track (i.e. right angle, 45 degrees, curve, straight, etc.)

I don't know if I am being thick, but surely this is the most simple way to do this? If you don't have a scroll wheel, firstly life must be difficult doing PCB and circuit designs, but secondly, it would be well worth getting hold of one!

• +1. Didn't know you could do that! Sure enough clicking the middle button brings up a window to change layer – Tom Carpenter May 16 '17 at 12:54
• @TomCarpenter It comes up with the window if you are using the draw line function, but with the route option it does it straight to bottom / top layer and inserts via without having to make a selection (at least, on my version it does (free 8.1 or something)) – MrPhooky May 16 '17 at 14:00
• I'm still using 6.6. Decided not to bother with 8 as too much of the interface has been messed around with – Tom Carpenter May 16 '17 at 16:06