# How to configure Session Event Key Event

**URL:** <https://forum.inductiveautomation.com/t/how-to-configure-session-event-key-event/65419>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 19, 2022, 7:43pm UTC](https://forum.inductiveautomation.com/t/how-to-configure-session-event-key-event/65419 "2022-10-19T19:43:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Potvin](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Alexandre\_Potvin](https://forum.inductiveautomation.com/u/Alexandre_Potvin)\
**Post date:** [October 19, 2022, 7:43pm UTC](https://forum.inductiveautomation.com/t/how-to-configure-session-event-key-event/65419/1 "2022-10-19T19:43:00Z")

</div>

Hi

I am trying to configure a Session Events , Key Event .  
My script is very simple and i used it in a button and it work :  
system.perspective.navigate('/stat')

The goal is to have a barcode scanner that will read a barcode then the page will change open to other idea then the Session Event.

I configured Keydown and then did many test like : F1, spacebar, Code,.  
I also tried the option : Capture Phase and Prevent Default.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/be628391c522440213821a15a2ab32ff2f1796f0.png)

Thank You

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 19, 2022, 8:00pm UTC](https://forum.inductiveautomation.com/t/how-to-configure-session-event-key-event/65419/2 "2022-10-19T20:00:50Z")

</div>

Your one line needs to be indented the same depth as the comment above it.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Potvin](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@Alexandre\_Potvin](https://forum.inductiveautomation.com/u/Alexandre_Potvin)\
**Post date:** [October 19, 2022, 8:04pm UTC](https://forum.inductiveautomation.com/t/how-to-configure-session-event-key-event/65419/3 "2022-10-19T20:04:04Z")

</div>

It work very well with event.key but i cant get to make it work with event.code is the something different when that happen.
