Recent

Author Topic: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?  (Read 5162 times)

RedOctober

  • Sr. Member
  • ****
  • Posts: 452
I'm using a TSynEdit component and it has the Tab to spaces block indent and outdent working correctly, according to the default settings.

However, somewhere (maybe Delphi?) I picked up the habit of using Ctrl-K (let go, then letter) commands.  I think this is from some other IDE... can't remember the name... Ellipses, or Escapde, or something that starts with an "E". 

I looked at the "Key's property in my SynEdit and it looks like that's the place to add this combo, but, it doesn't work, because in the Keys property, it's expecting all 3 keys to be pressed at once, but in the Ctrl-K commands you only press the Ctrl-K to start, then let go, then press either an I or a U key.

I know this can be made to work, because Lazarus itself works this way (knows what to do with Ctrl-K (then let go) key presses.

How do I make my project act like Lazarus?

Thanks in advance.

ccrause

  • Hero Member
  • *****
  • Posts: 845
However, somewhere (maybe Delphi?) I picked up the habit of using Ctrl-K (let go, then letter) commands.  I think this is from some other IDE... can't remember the name... Ellipses, or Escapde, or something that starts with an "E". 
I used these shortcuts way back in school using Turbo Pascal 3.3.  Apparently it is compatible with Wordstar.

taazz

  • Hero Member
  • *****
  • Posts: 5368
I'm using a TSynEdit component and it has the Tab to spaces block indent and outdent working correctly, according to the default settings.

However, somewhere (maybe Delphi?) I picked up the habit of using Ctrl-K (let go, then letter) commands.  I think this is from some other IDE... can't remember the name... Ellipses, or Escapde, or something that starts with an "E". 

I looked at the "Key's property in my SynEdit and it looks like that's the place to add this combo, but, it doesn't work, because in the Keys property, it's expecting all 3 keys to be pressed at once, but in the Ctrl-K commands you only press the Ctrl-K to start, then let go, then press either an I or a U key.

I know this can be made to work, because Lazarus itself works this way (knows what to do with Ctrl-K (then let go) key presses.

How do I make my project act like Lazarus?

Thanks in advance.
Are you using synedit as your editor or something else? If you are using synedit take a look on the Keystrokes property if you use something else you will have to emulate the keystrokes I guess.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Looking at the keystrokes of synedit myself (default settings):

Blockindent is shift+ctrl+I
No ctrl+k involved.

Yes Shift and Ctrl and I have to be pressed together. This is how Shift, Ctrl and Alt work. You can change this in your OS settings (with most OS), and make them sticky. But this is on OS configuration

You can change the config to either

Ctrl+K  (let go) and then Ctrl+I
Ctrl+K  (let go) and then I

You can add the ecBlockIndent more than once, to have both configs

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Note the textmode IDE uses the TP wordstar style. Would be nice if we had a template for synedit and the Lazarus IDE that is compatible to FP.
I also like wordstar commands over the current templates. (Delphi IDE compatible)
Specialize a type, not a var.

 

TinyPortal © 2005-2018