# Request: Option to change keyboard shortcut

**URL:** <https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707>\
**Category:** Charts In-Game Panel Beta Testing\
**Created:** [January 5, 2023, 3:54pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707 "2023-01-05T15:54:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BobbyFuzzy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.navigraph.com/bobbyfuzzy/32/107_2.png) [@BobbyFuzzy](https://forum.navigraph.com/u/BobbyFuzzy)\
**Post date:** [January 5, 2023, 3:54pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/1 "2023-01-05T15:54:28Z")

</div>

With the previous Navigraph panel, I obtained a version via this forum whereby changing the keyboard shortcut was possible. I wonder if this is possible to implement in the new version?

---

<div class="post-metadata">

**Author:** ![skysail](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.navigraph.com/skysail/32/304_2.png) [@skysail](https://forum.navigraph.com/u/skysail)\
**Post date:** [January 5, 2023, 4:07pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/2 "2023-01-05T16:07:47Z")

</div>

Hello Rob!

The same procedure that was used to change it in the old version should work for this new version as well. Is it not working for you? You should **not** need a custom version anymore, it is built-in.

Here are the steps that are still relevant (with altered filename since we’re in beta still):

> [@Changing keyshortcut](https://forum.navigraph.com/t/changing-keyshortcut/7892/3):
>
> - Open the `NavigraphPanelBeta.js` file in a text editor. You will see something like this:
> 
> ![image](https://europe1.discourse-cdn.com/flex013/uploads/navigraph1/original/2X/e/e8f8636e2ef7c9f5d1878ff5b9b4aa1f5ec71a9a.png)
> 
> - Open a web browser and navigate to [https://keycode.info/](https://keycode.info/)
> - Press the key that you want to associate with the panel
> - Replace the number after `shortcutKey` in the open textfile with the value that is presented to you in large font on the website. For example, the A key corresponds to the number `65`.
> - On the next row, you can toggle whether or not you want to require pressing the Ctrl modifier key in combination with your selected key for the panel to show. Simply set the value to `false` if you do not wish to press it.

Kind Regards,  
Malte

---

<div class="post-metadata">

**Author:** ![BobbyFuzzy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.navigraph.com/bobbyfuzzy/32/107_2.png) [@BobbyFuzzy](https://forum.navigraph.com/u/BobbyFuzzy)\
**Post date:** [January 5, 2023, 4:41pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/3 "2023-01-05T16:41:22Z")

</div>

Hi! Thanks for the response.

I already checked NavigraphPanelBeta.js and I’m not seeing the same syntax as before. The two const declarations at the top of the old version are not there and I didn’t want to mess with adding or changing anything else as I don’t know any JS!

With the new version, is it a case of changing ‘undefined’ within:

```auto
if(typeof shortcutKey!=='undefined')

```

and

```auto
if(typeof shortcutCtrl!=='undefined')

```

Also I wonder if it’s possible to change the modifer to Shift instead of Ctrl?

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![skysail](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.navigraph.com/skysail/32/304_2.png) [@skysail](https://forum.navigraph.com/u/skysail)\
**Post date:** [January 5, 2023, 7:21pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/4 "2023-01-05T19:21:22Z")

</div>

> [@BobbyFuzzy](#):
>
> The two const declarations at the top of the old version are not there

You’re right, but they can be safely added in the exact same way as they were in the old version, just copy & paste the two lines over! I know it isn’t optimal, but it’s the best we have at the moment.

Here’s what you should add to the top of the file:

```javascript
const shortcutKey = 78;
const shortcutCtrl = true;

// Original file content here

```

* * *

> [@BobbyFuzzy](#):
>
> With the new version, is it a case of changing ‘undefined’ within:
> 
> ```auto
> if(typeof shortcutKey!=='undefined')
> 
> ```
> 
> and
> 
> ```auto
> if(typeof shortcutCtrl!=='undefined')
> 
> ```

No, those should not be touched. They check for manual overrides like the ones mentioned above!

* * *

> [@BobbyFuzzy](#):
>
> Also I wonder if it’s possible to change the modifer to Shift instead of Ctrl?

Not at the moment, unfortunately. But we can certainly add the possibility!

---

<div class="post-metadata">

**Author:** ![BobbyFuzzy](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.navigraph.com/bobbyfuzzy/32/107_2.png) [@BobbyFuzzy](https://forum.navigraph.com/u/BobbyFuzzy)\
**Post date:** [January 5, 2023, 8:22pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/5 "2023-01-05T20:22:02Z")

</div>

Brilliant, thank you!

> [@skysail](#):
>
> But we can certainly add the possibility!

That would be grand! Thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/navigraph1/original/1X/4cc83e90d70ab312b1bd2d7527bddad309607265.png) [@system](https://forum.navigraph.com/u/system)\
**Post date:** [January 7, 2023, 8:22pm UTC](https://forum.navigraph.com/t/request-option-to-change-keyboard-shortcut/10707/6 "2023-01-07T20:22:03Z")

</div>

Closed on January 7, 2023, 8:22pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
