# Keyboard shortcuts

**URL:** <https://discourse.processing.org/t/keyboard-shortcuts/24291>\
**Category:** Beginners\
**Created:** [October 2, 2020, 6:59pm UTC](https://discourse.processing.org/t/keyboard-shortcuts/24291 "2020-10-02T18:59:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moms\_spaghetti](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@moms\_spaghetti](https://discourse.processing.org/u/moms_spaghetti)\
**Post date:** [October 2, 2020, 6:59pm UTC](https://discourse.processing.org/t/keyboard-shortcuts/24291/1 "2020-10-02T18:59:42Z")

</div>

Hello  
Can somebody give me a list or say where I can find them , of all or at least the most important keyboard shortcuts as this would be very helpfull ?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 2, 2020, 8:04pm UTC](https://discourse.processing.org/t/keyboard-shortcuts/24291/2 "2020-10-02T20:04:59Z")

</div>

Hello,

and welcome to the forum!

Great to have you here!

Good question!

**You can see the shortcuts in the menus of the processing IDE / Editor**

Let me mention this first.

**Productivity**

In general, what gives you productivity?

- Using Keyboard shortcuts is one aspect
- Learn to type with 10 fingers really
- be familiar with reference and example section (online and offline)
- Use libraries like PeasyCam and G4P - don’t reinvent the wheel
- have a couple of “Empty Sketches” ready, so you can just load them as a starting point. They are not really empty, but they contain stuff you usually need, like `setup()` and `draw()`. Or more advanced, setup, draw, a splash screen and a help screen and a headline and a status bar ([Status bar - Wikipedia](https://en.wikipedia.org/wiki/Status_bar)). They even can have multiple tabs. **Examples:** 2D or 3D, one with setup and draw, one with setup, draw, mousePressed, keyPressed, one with a full State System in draw(), mousePressed() and keyPressed(), one with a full 3D-stage and camera movement (see [https://www.youtube.com/watch?v=unx6p\_n7W90](https://www.youtube.com/watch?v=unx6p_n7W90) where the castle is on the stage but the stage with sky and clouds is an empty sketch I use as a starting point to implement something on the stage).
- Use something like AutoHotkey (AHK), see [AutoHotkey - Wikipedia](https://en.wikipedia.org/wiki/AutoHotkey) ; you could store fancy functions there with short cuts

But I will list a few common short-cuts here.

**In the IDE / Editor**

There is the normal _editor stuff_ like

- ctrl-c, ctrl-v, ctrl-x, ctrl-a…
- cursor and
- ctrl-cursor left, ctrl-cursor right ctrl-cursor Up, ctrl-cursor Down…
- Pos1 and End
- ctrl-Pos1 and ctrl-End
- Tab
- Right mouse click for local menu

Then the normal _program stuff_ like

- Enter Menu with Alt-f, Alt-d etc. and maneuver with cursor or letters (like p for paste when in Menu Edit)
- ctrl-n, ctrl-p, ctrl-s, ctrl-o (New, print, save, open)
- ctrl-f Find

and then cool _special stuff_ like

- ctrl-t auto-format and auto-indent (_I love it_)
- ctrl-r RUN
- ctrl-Shift-F get offline reference for the selected command (nice!)
- ctrl-k open the Sketch Folder: which is nice, when you want to look at the images of the Sketch etc.
- ctrl-shift-N New tab (tabs are cool anyway)

**In a running Sketch**

In a running Sketch :

- Escape : stop Sketch (Alt-F4 in Windows)

**In the forum**

when you hover the mouse over the buttons in the small _command bar_, short-cuts are displayed such as

- ctrl-b, ctrl-i, ctrl-Shift-C

**Mouse in the IDE/Editor**

- Click : Place cursor
- Double-Click : select Word
- Triple-Click : select Paragraph (or line)
- Drag : select passage

**Remark**

For a list of Editor / IDE commands see [https://www.processing.org/reference/environment/#PDE](https://www.processing.org/reference/environment/#PDE)

Chrisir

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 3, 2020, 12:10pm UTC](https://discourse.processing.org/t/keyboard-shortcuts/24291/3 "2020-10-03T12:10:16Z")

</div>

I mentioned Empty Sketches.

You have them on your hard drive and you can load them and start programming.  
You save them with a new name.

Here is a typical example:

For 2D

```auto

// 2D Sketch 

// ------------------------------------------------------------------------
// The two core functions

void setup() {
  size(800, 800);
} // func 

void draw() {
  background(0, 0, 0);

  fill(255, 0, 0);
  noStroke();

  for (int i=0; i < 10; i++) {
    ellipse(130+i*50, 50, 
      20, 20);
  }
} // func 

// ------------------------------------------------------------------------
// Other functions

void myFunction(float x, float y, float z) {

  // do something
  //
} // func 
//

```

* * *

For 3D

```auto

// 3D Sketch 

// ------------------------------------------------------------------------
// The two core functions

void setup() {
  size(800, 800, P3D);
} // func 

void draw() {
  background(0, 0, 0);
  lights();

  mySphere(400, 400, 0);
} // func 

// ------------------------------------------------------------------------
// Other functions

void mySphere(float x, float y, float z) {
  translate(x, y, z);

  fill(255, 0, 0);
  noStroke();
  sphere(100.0);
} // func 
//

```
