make Home key go to 1st non-whitespace character on line

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
mikez302
Posts: 20
Joined: Thu Nov 20, 2008 7:46 pm

make Home key go to 1st non-whitespace character on line

Post by mikez302 »

I am trying to make my Home key go to the first non-whitespace character on the line that the cursor is on.

For example, if I have the following code:

Code: Select all

for i in range(5):
    print 'hi'
and my cursor is on the 2nd line, I would like the Home key to send the cursor to the "p" in "print". Is there any way to do this?
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

That's strange. By default the Home key is assigned to the command LineStart which is supposed to do just what you described. But you're correct: the Home key goes to the left margin (which is what LineLeft is supposed to do). Perhaps you've found a bug; can someone else confirm?

I'm running v5.2.0 on XP Professional. What version are you using?

Andrew
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

I'm using 5.2.0 with keystroke compatibility set to Microsoft Applications.

if the cursor is NOT on the first non-whitespace character of the line, the cursor jumps to the first non-whitespace character when I press home.

if the cursor is on the first non-whitespace character of the line, the cursor jumps to position 0.
mikez302
Posts: 20
Joined: Thu Nov 20, 2008 7:46 pm

Post by mikez302 »

After some experimentation, I discovered that if I have word wrap disabled, pressing Home once moves to the first non-whitespace character on the line, and pressing it a second time moves all the way to the left side.

With word wrap enabled, pressing Home always goes to the left side for some reason. I am trying to make the Home key go to the first non-whitespace character without having to disable word wrap, but so far I haven't figured out a way. I tried testing this with my Home key set to LineStart, and also set to LineLeft, and it doesn't seem to make any difference. Does anyone here have any advice?
Post Reply