Recent

Author Topic: Ctrl+J in the textmode IDE ?  (Read 3648 times)

Nitorami

  • Sr. Member
  • ****
  • Posts: 481
Ctrl+J in the textmode IDE ?
« on: July 14, 2020, 02:55:42 pm »
Anybody knows what Ctrl+J is meant to do in the Textmode IDE, except for freezing it ?

I had to kill the IDE quite a couple of times after mistyping Ctrl-J for Ctrl-K... until I found that the lock can be released with ESC.

Thaddy

  • Hero Member
  • *****
  • Posts: 14165
  • Probably until I exterminate Putin.
Re: Ctrl+J in the textmode IDE ?
« Reply #1 on: July 14, 2020, 05:38:59 pm »
In the textmode ide, most commands are derived from Wordstar. (a dinosaur text editor)
The ctrl-j command should open help, not code completion...
See: http://www.wordstar.org/index.php/wsdos-documentation/wsdos-commands/108-wordstar-3-for-dos-commands-reference

So indeed, if there is no help installed, nothing is shown, but use escape to exit as you would closing help (in wordstar or TurboPascal).
That behavior is correct. It is also how TP works.
« Last Edit: July 14, 2020, 05:44:19 pm by Thaddy »
Specialize a type, not a var.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Ctrl+J in the textmode IDE ?
« Reply #2 on: July 14, 2020, 05:43:34 pm »
It's probably a shortcut intercepted by the terminal emulator or the underlying shell, etc., so the focus goes away from the terminal itself (and the IDE) and it appears as if it were frozen.

The solution, if any, depends on which OS, which shell and/or which terminal you're using.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Thaddy

  • Hero Member
  • *****
  • Posts: 14165
  • Probably until I exterminate Putin.
Re: Ctrl+J in the textmode IDE ?
« Reply #3 on: July 14, 2020, 05:48:00 pm »
It's probably a shortcut intercepted by the terminal emulator
No. ctrl-j should open help for the reasons I have described above. If there is no help installed (common for textmode IDE) then escaping returns.

That is not to say that it can't be overridden in future code to accept ctrl-j for code completion, like in Lazarus.
Specialize a type, not a var.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Ctrl+J in the textmode IDE ?
« Reply #4 on: July 14, 2020, 06:05:19 pm »
No. ctrl-j should open help for the reasons I have described above. If there is no help installed (common for textmode IDE) then escaping returns.

If that were the case it would open the help window with the message about installing the CHMs, but it doesn't; it just takes the focus away from the shell to the terminal window, as if it had been intercepted by the terminal emulator. At least that's what it does here in a quick test with xfce4-terminal.

And note also that while TP (and FP IDE) follow the WS convention they follow it rather loosely and not all WS shortcuts work or even do the same as in WS. In my TP 7.0 install Ctrl+J doesn't open the help window at all: you have to press F1 for that (which at least in Linux, as most common shortcuts, interferes with the terminal emulator/windows manager own shortcuts). :(
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Thaddy

  • Hero Member
  • *****
  • Posts: 14165
  • Probably until I exterminate Putin.
Re: Ctrl+J in the textmode IDE ?
« Reply #5 on: July 14, 2020, 06:11:40 pm »
That is true, some terminal emulators intercept for their own reasons. You can disable the menu, though, in most cases.
(We old hands know about WS  :D)
« Last Edit: July 14, 2020, 06:13:29 pm by Thaddy »
Specialize a type, not a var.

Nitorami

  • Sr. Member
  • ****
  • Posts: 481
Re: Ctrl+J in the textmode IDE ?
« Reply #6 on: July 14, 2020, 09:16:16 pm »
Alright, that sounds plausible. I did not know that the IDE sits on a terminal emulator in windows.
Pressing Ctrl-J feels similar to Alt-F-P which really freezes everything unless you set the printer to nul... or is there another terminal sequence to escape from printing ?


 

TinyPortal © 2005-2018