[IGN-7043] Commenting out a block of code

Expected behavior
When pressing CTRL-/ in a script window in Designer, i expect the selected lines to be commented out

Actual behavior
It collapse every indentation level in my code and add a "+" in front of every levels which been collapsed


  • I'm using Ignition Designer 8.1.22
  • I'm using a QUERTY keyboard, without accents but using French Canada in Windows Keyboard Layout
  • There is 2 "/" on the keyboard. One at the left of my right Shift, and one over the 8 on the Num. Keypad. I've tried both. The one above the 8 with CTRL will collapse every indent, while CTRL+/ on the left of my right Shift will do Nothing.
  • There is also another possibility to produce a / on my layout by pressing SHIFT-3. So i've tried CTRL-SHIFT-3. It does nothing too.

My thought
I suspect that the keyboard layout is just wrong. This app run on multiple OS and keyboard mapping always been a problem for many applications.

This is not the only keyboard related issue i've, i guess. Usually an application CANCEL a popup when pressing ESC but this doesn't work too and it is annoying.

I've read on another post that someone else have a problem, with an AZERTY keyboard using a French layout.

Thanks for the detailed report.

This is expected behavior, or at least behavior we haven't overridden; the default behavior of the text editing library uses Ctrl + the number pad to control folding:

This is definitely not expected behavior. On my (English, US) system, Ctrl + / sends a 'forward slash' key event - it seems likely that your system is sending some other keycode? If you're able to, could you try a tool like this to see what keycode is actually being sent by your keyboard when you do a / or Ctrl + /? Javascript Key Event Tester

Can you provide specific examples of which popups you expect to close on Esc that aren't? Generally, the pattern within Ignition is for "lightweight" popups to close on escape (e.g. the color helper in Vision), but "full-weight" windows (e.g. the script console) not to.

I've tested the Javascript Key Event Tester. I get keyCode 17 (Ctrl), and 191 (/).

It's not just the scripting dialog. Todays application usually use the ESC to Cancel.

  • Let's say i have a button and i press Ctrl-J (Component Scripting)
  • If i go to Scripting/Gateway Events
  • If i go to Vision / Client Events

The only place i've seen where the ESC work is on:

  • Project Properties
  • Tag/UDT Editor

Generally speaking, i would expect any Popup having these button to cancel on ESC:


Windows like Script Console doesn't have these so i agree with you, this shouldn't close on ESC.

1 Like

Hi, some solution for this bug ? i have the same problem.


1 Like

No, no update. We'll have to replicate the problem internally so we can see why Java is (apparently) not detecting the right keystroke for this input.

Are you also using a French Canadian/QUERTY keyboard layout, or something different?

Yes same problem with:

1 Like

I'm using QWERTY Italian layout

1 Like

Are any of you able to try out the below project?

Just open it, click into the text area, and press whatever keys you need to do a Ctrl + Slash. You'll need a local Java installation - ideally Java 11 from Azul to align as closely as possible with Ignition.
The below archives should have a runnable batch file that will try to autodetect Java from your system.

swing-event-tester-1.0-SNAPSHOT.zip (7.9 KB)
swing-event-tester-1.0-SNAPSHOT.tar (20 KB)

KEY_PRESSED,keyCode=17,keyText=Ctrl,keyChar=Non défini keyChar,modifiers=Ctrl,extModifiers=Ctrl,keyLocation=KEY_LOCATION_LEFT,rawCode=17,primaryLevelUnicode=0,scancode=29,extendedKeyCode=0x11
KEY_PRESSED,keyCode=0,keyText=Inconnu keyCode: 0x0,keyChar='é',modifiers=Ctrl,extModifiers=Ctrl,keyLocation=KEY_LOCATION_STANDARD,rawCode=191,primaryLevelUnicode=233,scancode=53,extendedKeyCode=0x10000e9
KEY_RELEASED,keyCode=0,keyText=Inconnu keyCode: 0x0,keyChar='é',modifiers=Ctrl,extModifiers=Ctrl,keyLocation=KEY_LOCATION_STANDARD,rawCode=191,primaryLevelUnicode=233,scancode=53,extendedKeyCode=0x10000e9
KEY_RELEASED,keyCode=17,keyText=Ctrl,keyChar=Non défini keyChar,keyLocation=KEY_LOCATION_LEFT,rawCode=17,primaryLevelUnicode=0,scancode=29,extendedKeyCode=0x11
1 Like

Well, that's definitely the source of the problem. We'll have to see what we can do to fix.

1 Like