MoveDocumentStartEx kicking in even with control key pressed

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
martinlooker
Posts: 20
Joined: Tue Oct 11, 2005 12:55 pm

MoveDocumentStartEx kicking in even with control key pressed

Post by martinlooker » Mon Oct 31, 2005 1:41 pm

I have Home mapped to MoveDocumentStartEx.
I have Ctrl+Home mapped to an insert comment macro.

If I press Home, to move to line start, then Ctrl+Home to insert the comment the cursor moves to the top of the page an inserts the comment there, instead of at the beggining of the original line.

It appears that the MoveDocumentStartEx is being called even when the Control key is pressed.

jussij
Site Admin
Posts: 2446
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Wed Nov 02, 2005 3:08 am

If I press Home, to move to line start, then Ctrl+Home to insert the comment the cursor moves to the top of the page an inserts the comment there, instead of at the beggining of the original line.

I tried to replicate this by making similar changes to the simple keyboard mapping, but for me the keys worked as as expected :?
It appears that the MoveDocumentStartEx is being called even when the Control key is pressed.
The MoveDocumentStartEx by design, will move the cursor to the top of the page if two consecutive Home keys are pressed. So the fact that the cursor moved to the top of the page suggests that two home key events where in fact generated. Are you sure the Windows auto repeat did not generate these extra Home key events :?:

For example if you hold down the home key you will notice the cursor in fact make three movements and ends up at the start of the document. This is MoveDocumentStartEx working as designed, with the auto repeat generating at lease three Home key press events.

If you do not want these extra cursor movements you need to re-map the Home key to MoveLineHome and then the cursor will only move to the start of the line.

Cheers Jussi

martinlooker
Posts: 20
Joined: Tue Oct 11, 2005 12:55 pm

Post by martinlooker » Wed Nov 02, 2005 11:33 am

I've figured it out...

It is not auto-repeat, but my macro includes a call to MoveDocumentStartEx. The intention was to move to the start of the line prior to inserting the comment. As I was also pressing home to move to the line start myself, that resulted in two calls to MoveDocumentStartEx. I'll change the macro to use MoveLineHome to avoid this.

Apologies for wasting your time.

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 9 guests