Recent

Author Topic: cursor movement shortcuts  (Read 5922 times)

MarkBravington

  • New Member
  • *
  • Posts: 10
cursor movement shortcuts
« on: September 15, 2010, 02:07:44 am »
Dear Lazarites

I am just starting to switch over from Delphi to Lazarus, and I'm really impressed-- what a great piece of free software! Thank you.

Now, one question/request.

Keyboard shortcuts can be assigned to almost all IDE editor features, *except* the single-step cursor movements (left, right, up, down) which are of course handled by the arrow keys. They don't show up on the key-binding menus. I would like to be able to bind them to the Wordstar Diamond (ctrl-E/D/S/X).

This probably sounds trivial, but it's quite a problem for those of us dinosaurs who have persuaded all other software (incl. Delphi) to behave like WordStar...

If this is too obscure for Lazarus developers to tackle, then it would be useful to get some tips on where to start doing it myself. It would be a big job for me, since I have no idea how the IDE works, but I'd be willing to try because I do love my Wordstar Diamond!

Mark Bravington
CSIRO, Hobart,  Australia 7001

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2695
Re: cursor movement shortcuts
« Reply #1 on: September 16, 2010, 12:57:49 am »
If you want to fix yourself, have a peek at ide/keymapping.pp and look for ecLeft, ecRight, ecUp, ecDown  and TKeyCommandRelationList.CreateDefaultMapping (guessing)

For bugs, see my sig.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

MarkBravington

  • New Member
  • *
  • Posts: 10
Re: cursor movement shortcuts
« Reply #2 on: September 21, 2010, 05:39:23 am »
Marc-- thanks. To my astonishment, I have been able to fix this. The lazarus source is very well laid out and the build process was very easy.

I have also fixed another already-reported problem: for two-key shortcuts where the first key needs CTRL, the state of CTRL should not be relevant for the second key. [The problem being that if you use both the A & B shortcuts to set up one version with CTRL pressed for the 2nd key and one with CTRL not pressed, then you have no spare shortcuts for other keys. Example: CTRL-Q S and HOME.] The editor now has the behaviour I want, although I suspect that there should also be a change to the checking-for-conflicting-shortcuts code which I'm not about to make.

I'm in the process of trying to put a patch together.

Mark Bravington

 

TinyPortal © 2005-2018