Recent

Author Topic: Better keyboard control in the IDE  (Read 10615 times)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Better keyboard control in the IDE
« on: May 27, 2015, 06:03:54 pm »
I can't really stress enough how much I dislike having to reach for the mouse. Things like, for example:
  • The menu designer!!!;
  • jumping from form to object inspector and back with F10;
  • press Enter to go from a message in the message window to the editor;
  • etc., etc.
are not too difficult to add to the IDE, are they?

Please, pretty please, think about adding better support for keyboard-mostly(1) IDE operation.

(1) I _do_ realize that "keyboard-only" is an unattainable objective.
« Last Edit: May 27, 2015, 06:06:34 pm by lucamar »
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.

garlar27

  • Hero Member
  • *****
  • Posts: 652
Re: Better keyboard control in the IDE
« Reply #1 on: May 27, 2015, 07:23:24 pm »
All menu comands can be configurated in the IDE options (Ctrl+Shift+O). Go to "Editor/Keyboard Shortcuts" and you can set almos any action (except to change from the "Message Window" to the Code Editor"  :(  ).

F11 is used to go to Object Inspector.
F12 goes to the code editor or Form Editor (except when you are in the message window).

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Better keyboard control in the IDE
« Reply #2 on: May 27, 2015, 08:09:49 pm »
Yes, I know all that; those were just examples that came to mind  (and yeah, F11) but there are many, many places in the IDE and the designers where you *want* to do something with the keyboard ... and you can't (like in the menu designer example).

It's not that difficult (IMHO). In fact I added some things to my copy back in the 0.9.? days---and then lost everything in a disk crash. I may do it again when I am not swamped with other projects but until then ...


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.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Better keyboard control in the IDE
« Reply #3 on: May 27, 2015, 08:51:29 pm »
Can you give specific examples of what you wish to do in the menu designer from the keyboard which can only currently be done using the mouse (or not at all)?

Specific shortcomings are sometimes surprisingly straightforward to submit improvement patches for. Vague wishlists/complaints don't usually produce any improvements from anyone.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Better keyboard control in the IDE
« Reply #4 on: May 27, 2015, 09:47:58 pm »
Can you give specific examples of what you wish to do in the menu designer from the keyboard which can only currently be done using the mouse (or not at all)?

Suppose you have a MainMenu in your form; you double-click it and enter the menu designer. From then on, inside the designer, *everything* has to be made with the mouse. Whatever key you thump, it matters not. (Compare to Delphi, p.e.)

At less, That is what happens to me (WinXP, Laz. 1.4, FPC 2.6.4) and the experience I've had since my first Lazarus (long, long time ago).

Edit to add: When I say "everything", I mean everything: adding new menuitems, adding submenus, etc.
« Last Edit: May 27, 2015, 09:50:46 pm by lucamar »
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.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Better keyboard control in the IDE
« Reply #5 on: May 27, 2015, 10:48:33 pm »
Can you give specific examples of what you wish to do in the menu designer from the keyboard which can only currently be done using the mouse (or not at all)?

Suppose you have a MainMenu in your form; you double-click it and enter the menu designer. From then on, inside the designer, *everything* has to be made with the mouse. Whatever key you thump, it matters not. (Compare to Delphi, p.e.)

At less, That is what happens to me (WinXP, Laz. 1.4, FPC 2.6.4) and the experience I've had since my first Lazarus (long, long time ago).

Edit to add: When I say "everything", I mean everything: adding new menuitems, adding submenus, etc.
My advice, forget about extending the designer and create a custom lazarus addon that will open a dialog to select and edit all menus(main, popup etc) on the focused form. IT would be easier than to try to extend the existing designer. Also I have on my to do list to take a close look on those all "collection type" designers for some time now I think that I'll move it up on my to do list right after the scriptengine2 IDE I'm porting. It would have been even higher if I did not had to install the bleeding edge of lazarus to work on them.
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

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Better keyboard control in the IDE
« Reply #6 on: May 28, 2015, 06:39:03 pm »
My advice, forget about extending the designer and (...snip...)
Yeah, I see what you mean and it would also make easier to synch mainmenus with popupmenus. I may give it a (small) whirl some weekend if I'm bored.

I do have (somewhere) a menu designer I did for a Windows 3.x "ressource workshop" thing. If I can find it and have a couple free hours I may try porting it. *sigh*

Thanks everyone.
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.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Better keyboard control in the IDE
« Reply #7 on: May 28, 2015, 11:21:08 pm »
Pressing Enter in the message window should really go to source editor. I don't know why it is not implemented. The message window was revamped recently and may not be perfect yet.
Please open a bug report. A possible patch will be accepted, too.

About the menu editor: taazz and lucamar, please don't create custom addons for it. Instead provide a new version as a replacement for the current menu editor. We can enclose it inside {$IFDEF NewMenuEditor} or similar so it does not need to be perfect from the start.
The menu editor has bee improved and fixed by many people during the years. All of them, including Vincent, myself and latest Michael Thompson have finally noted that it should be rewritten.
It still did not happen and the feeling is like "we spent so much time with the menu editor already, we cannot throw it away now" ... but yes we must throw it away.
lucamar, are you our next hero? Does your menu editor suck less than our current menu editor?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Better keyboard control in the IDE
« Reply #8 on: May 29, 2015, 12:56:31 am »
lucamar, are you our next hero? Does your menu editor suck less than our current menu editor?
Your menu editor does not suck per see it needs a couple basic things that would make it easier to work with.

1) Support for "selected/focused item" and make sure that there is no way to have no item selected.
2) add support for the basic action insert/delete. Pressing the insert key do an insert after the selected,  pressing the delete key do a delete the selected.
3) use arrow keys to navigate in the menu (change the selected).
3) Add support for movement, up(ctrl+up), down(ctrl+down), in to sub menu(ctrl + right), out of sub menu (ctrl+left).
4) The current terminology makes things a bit confusing and its a bit to reach as well (ee it has to many options), for example "create submenu" requires an existing menu item to "convert" it to a sub menu so "convert to submenu" would be a better caption. My recommendation is to remove the "create submenu" and replace it with a "add sub item" minimizing the required steps to create a sub menu item also make sure that if the menu already has sub items the action will append a new item at the end of the list.  Tell you what I'll make it my next project after my current port. Its about time that I give something back to the project my self.


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

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Better keyboard control in the IDE
« Reply #9 on: May 29, 2015, 10:04:22 am »
Your menu editor does not suck per see it needs a couple basic things that would make it easier to work with.

Apparently you did not try to modify it yet yourself. :)

Quote
Tell you what I'll make it my next project after my current port. Its about time that I give something back to the project my self.

Good luck!
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 14157
  • Probably until I exterminate Putin.
Re: Better keyboard control in the IDE
« Reply #10 on: May 29, 2015, 11:27:22 am »
The adagium that EVERYTHING (well, as much as possible) should be controlable from the keyboard still holds.
If something is implemented in an IDE it should respect that adagium.
Maybe I am old skool, but during programming I dislike having to reach for a mouse. (Hence I dislike the Lazarus IDE to some extend compared to e.g. D7)
Specialize a type, not a var.

balazsszekely

  • Guest
Re: Better keyboard control in the IDE
« Reply #11 on: May 29, 2015, 11:56:17 am »
@Thaddy

Since this is an open source project, the adagium that we should create as much patch as possible to improve the IDE also holds.  :)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Better keyboard control in the IDE
« Reply #12 on: May 29, 2015, 01:28:18 pm »
Your menu editor does not suck per see it needs a couple basic things that would make it easier to work with.

Apparently you did not try to modify it yet yourself. :)

True I do not know anything about the underline code. Then again the code might suck the designer not so much.

Quote
Tell you what I'll make it my next project after my current port. Its about time that I give something back to the project my self.

Good luck!
Thank you. You'll probably see me here cursing the powers that be for my fate on choosing this designer but hey cursing is always fun
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

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Better keyboard control in the IDE
« Reply #13 on: May 31, 2015, 11:17:43 am »
lucamar, are you our next hero? Does your menu editor suck less than our current menu editor?

Well, It suck much less (IMHO) but it was written using OWL for BP7 (because, in general, the Whitewater Ressource Editor sucked for serious programming).
Better, I think, is your suggestion: make a new one from scratch.

The menu editor has bee improved and fixed by many people during the years.

Yeah, it looks like it ...  8)
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.

 

TinyPortal © 2005-2018