# Game pause and return key issues

**URL:** https://discourse.processing.org/t/game-pause-and-return-key-issues/41702
**Category:** Coding Questions
**Created:** [April 12, 2023, 8:46pm UTC](https://discourse.processing.org/t/game-pause-and-return-key-issues/41702 "2023-04-12T20:46:37Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [April 13, 2023, 11:10am UTC](https://discourse.processing.org/t/game-pause-and-return-key-issues/41702/4 "2023-04-13T11:10:00Z")

</div>

for your approach:

also check out the new approach (!) here: [Scenes in Processing - #12 by Chrisir](https://discourse.processing.org/t/scenes-in-processing/40386/12)

It uses an interface

```auto

interface StateInterface {

  // Let's abstract

  // Let's abstract display()
  void showState();
  void keyPressedState();
  void mousePressedState();
}
//

```

Therefore, you can have the states all using this interface

You can also make keyPressed part of the class

---

_[View the full topic](https://discourse.processing.org/t/game-pause-and-return-key-issues/41702)._
