Hi,
Using CoolTerm 2.0.1 on Windows 64bit. I have CoolTerm to send $0D (CR) when Enter is pressed. This works fine when Enter on main keyboard is used. However, the Enter key on the keypad sends $03 (ETX). A friend I am working on a project with is using the Mac version of CoolTerm (same rev#) and does not have this problem.
Coolterm - Enter on keypad sends wrong character
-
- Posts: 3
- Joined: Fri May 19, 2023 6:07 am
- roger
- Site Admin
- Posts: 370
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: Coolterm - Enter on keypad sends wrong character
Hi Jeff,
MacOS actually differentiates between the "RETURN" and "ENTER" keys. Pressing "RETURN" creates a "Carriage Return" (CR) while pressing "ENTER" sends creates and "End of Text" (ETX) character. So, this is actually expected behavior, at least on macOS. However, I should probably catch any "ENTER" presses and apply the configured emulation regardless of whether RETURN or ENTER is pressed. Look out for the next release!
Roger
MacOS actually differentiates between the "RETURN" and "ENTER" keys. Pressing "RETURN" creates a "Carriage Return" (CR) while pressing "ENTER" sends creates and "End of Text" (ETX) character. So, this is actually expected behavior, at least on macOS. However, I should probably catch any "ENTER" presses and apply the configured emulation regardless of whether RETURN or ENTER is pressed. Look out for the next release!
Roger
-
- Posts: 3
- Joined: Fri May 19, 2023 6:07 am
Re: Coolterm - Enter on keypad sends wrong character
The Windows version has this problem, the MAC version does not.
Also, on the Windows version CTRL+H and CTRL+M are not sent. I have disabled the menu shortcuts, i.e. CTRL+C sends the correct character but CTRL+H and CTRL+M send nothing.
Also, on the Windows version CTRL+H and CTRL+M are not sent. I have disabled the menu shortcuts, i.e. CTRL+C sends the correct character but CTRL+H and CTRL+M send nothing.
- roger
- Site Admin
- Posts: 370
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: Coolterm - Enter on keypad sends wrong character
Yes, I have noticed the same same thing on Windows. CoolTerm simply sends the keystrokes that it receives from the native text control. In the case of CTRL+M and CTRL+H, it doesn't receive ANY keystrokes. I.e. CoolTerm is not even aware that any keys were pressed. Is it possible that Windows traps CTRL+M and CTRL+H, specifically, on a system level and prevents them from being received by a UI control?
There is a workaround, through. You can create macros for the missing control characters and set the preferences to assign the macros to Function keys. that way you can invoke those control characters with functions keys.
There is a workaround, through. You can create macros for the missing control characters and set the preferences to assign the macros to Function keys. that way you can invoke those control characters with functions keys.
-
- Posts: 3
- Joined: Fri May 19, 2023 6:07 am
Re: Coolterm - Enter on keypad sends wrong character
It seems that CTRL+M is an application specific hot key, it should not be trapped globally. Using SPY++ as described here: https://stackoverflow.com/questions/829 ... indows-api I can see that CoolTerm is receiving both the key down and up messages. In fact SPY++ uses both CTRL+M and CTRL+H so you have to have Coolterm in focus to run this test.
It is not a big deal, more of a curiosity.
It is not a big deal, more of a curiosity.
- roger
- Site Admin
- Posts: 370
- Joined: Fri Apr 24, 2009 12:41 am
- Contact:
Re: Coolterm - Enter on keypad sends wrong character
Thanks for checking this out. I just wrote a simple test app with only line of code to display the received character in the KeyDown event handler. As it turns out, the KeyDown event never fires for CTRL+H and CTRL+M on windows, while it fires just fine on macOS and Linux. This might be a bug in the IDE I'm using to develop CoolTerm. I'll go ahead and report it and see what happens. It would be nice if that gets fixed.
Meanwhile, CTRL+H is expected to produce a 0x08 character which is BS. You can therefore press backspace and achieve the same effect as pressing CTRL+H. Similarly, CTRL+M is expected produce a 0x0D character or CR. You could change the enter key emulation to use CR.
I will include support for SHIFT and CTLR in combination with ENTER/RETURN in the next CoolTerm build so that other line endings can be sent. With no extra modifier key, pressing enter will send whatever is selected for the enter key emulation. CTRL+ENTER will send CR, SHIFT+ENTER will send LF, and SHIFT+CTRL+ENTER will send CR+LF.
Meanwhile, CTRL+H is expected to produce a 0x08 character which is BS. You can therefore press backspace and achieve the same effect as pressing CTRL+H. Similarly, CTRL+M is expected produce a 0x0D character or CR. You could change the enter key emulation to use CR.
I will include support for SHIFT and CTLR in combination with ENTER/RETURN in the next CoolTerm build so that other line endings can be sent. With no extra modifier key, pressing enter will send whatever is selected for the enter key emulation. CTRL+ENTER will send CR, SHIFT+ENTER will send LF, and SHIFT+CTRL+ENTER will send CR+LF.