[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.


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

A solution for Azerty keyboard will be deployed ?

1 Like

I want to remind that this is not a problem about the Azerty keyboard. This is well explained in the thread. It's a problem of language set in Windows. I'm using French (Canada) with a QWERTY Keyboard.

but i agree, it would be nice to fix it. I'm not familiar with the ticket process. There must be some kind of "JIRA" behind it with a ticket IGN-7043 but i don't think we have access to that

1 Like

Not JIRA specifically, but yes, that's the ticket number for the internal issue for this.

In the somewhat arbitrary ticket prioritization process, this ticket just hasn't been picked up to be worked on yet. As the numbers imply, we have literally thousands of open tickets, all ranging wildly in severity. This is lower priority than many, so it hasn't reached the top of the pile.

WORKARROUND for Comment Out
I have 2 keyboard installed in Windows (French Canada and English Canada (a step further in windows config: Canadien Multilingue Standard)).

If i switch to English Canada, i can comment out using CTRL- (The is right bellow the ESC key on my keyboard). If this combination doesn't work for Azerty users or other type of language setuped in windows, i would suggest to press CTRL then try everything else. You might find a key which is working

Since the character doesn't show up on my post, herer's the key i'm talking about

I've tried with the English US layout, and it's the CTRL-/ (just at the left of my right shift key) which is working, but the / on the numeric keypad is not working.

No luck with the ESC key no mater which keyboard layout i chose.

1 Like

Just to help clear things up @Christian_de_Bellefe is saying the CTRL + ` combination works for them when using the English Canada keyboard. Not the CTRL + ~.

The ` character is used in markdown for preformatting text (used for maintaining formatting of code blocks most often). If you want to type just the ` character without the potential of getting preformatted text then you can escape it using the \ character. So the combination \` will yield just a ` character and prevent the preformatting.


Exactly. I wish i could run the SWING-EVENT-TESTER but i get an error message saying "this version of the Java Runtime only recognizes class file versions up to 52.0"

When using another keyboard layout, the keyboard characters typed won't be the same as displayed on the keyboard.

"`" alone with an English Canada Keyboard Layout setuped in Windows will give "/"

"~" (or SHIFT + `) with an English Canada Keyboard Layout setuped in Windows will give "\"

This explain why it work with an English Canada Keyboard.

If i use French Canada Keyboard Layout, and i want to produce a "/", i must press SHIFT-3 which correspond to the # character on the keyboard key). But doing CTRL-SHIFT-3 won't comment out the text. And most people don't use SHIFT-3... they use the / above the numeric keypad. But CTRL+/ above the numeric keypad won't work, no mather which keyboard layout is used (FR-CA, FR-MULTI, EN-CA, EN-US)