Lazarus

Programming => Packages and Libraries => SynEdit => Topic started by: RedOctober on April 15, 2018, 04:24:19 am

Title: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?
Post by: RedOctober on April 15, 2018, 04:24:19 am
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.
Title: Re: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?
Post by: ccrause on April 15, 2018, 07:02:39 am
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 (https://www.freepascal.org/docs-html/user/userse32.html).
Title: Re: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?
Post by: taazz on April 15, 2018, 09:16:38 am
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.
Title: Re: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?
Post by: Martin_fr on April 15, 2018, 10:16:39 am
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
Title: Re: How do I get Ctrl-K-I (block indent) and Ctrl-K-U (block outdent) to work?
Post by: Thaddy on April 15, 2018, 10:47:19 am
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)
TinyPortal © 2005-2018