Author Topic: <Home> key not taking me to col 1.  (Read 8923 times)

mhalsig

  • Community Member
  • Posts: 16
  • Hero Points: 0
<Home> key not taking me to col 1.
« on: April 20, 2007, 04:24:16 PM »
I have my <HOME> key set to begin-line in key bindings. In redefine common keys I have it set as well to begin line. When I hit my <HOME> key it always seems to take me to the first character on that line not to column 1. I am not sure what I have set up wrong. Another thing that confuses me is *.e or Macros are using the key binding correctly. I debugged the <HOME> key and found it was not using begin-line or begin-line-text-toggle. I am not sure what it is using. If I <ESC> and type in begin-line it works like a great.


Tim Kemp

  • Senior Community Member
  • Posts: 546
  • Hero Points: 92
Re: <Home> key not taking me to col 1.
« Reply #1 on: April 20, 2007, 05:15:59 PM »
Try pressing Home repeatedly.  It should toggle between positions as described in the comment from begin_line_text_toggle().

Quote
For a text box, the cursor is moved to column one.  For an edit window or editor control, if the cursor is not in column one, the cursor is placed on the first non blank character of the current line.  If the cursor is in a documentation comment or line comment, it is moved to the first non-blank character within the comment on the current line.  If the cursor is before the first non-blank character, it is moved to the right of the comment delimeter.  If the cursor is on the comment delimeter, it is moved to the left of the comment delimeter.  Otherwise the cursor is moved to column one.

mhalsig

  • Community Member
  • Posts: 16
  • Hero Points: 0
Re: <Home> key not taking me to col 1.
« Reply #2 on: April 20, 2007, 06:26:56 PM »
I always want it to go to the beginning of the line (column 1). Like BEGIN_LINE() is does. I do not want it to work like BEGIN_LINE_TEXT_TOGGLE(). When I hit the <HOME> key I always want to go to Column 1 not to the first non blank character and have to hit <HOME> again to get to column 1. Every setting I know about is set to BEGIN_LINE() (key bindings and redefine common keys) but it is not using BEGIN_LINE() I know this because I can use 'ESC' key and type in BEGIN_LINE() and it goes to column 1.

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: <Home> key not taking me to col 1.
« Reply #3 on: April 20, 2007, 08:02:11 PM »
It might not be a lot of help, but V12/xp/vim toggles <home> as expected from "Redefine..."

Tim Kemp

  • Senior Community Member
  • Posts: 546
  • Hero Points: 92
Re: <Home> key not taking me to col 1.
« Reply #4 on: April 21, 2007, 01:01:02 PM »
I just tried unbinding begin_line_text_toggle from Home and binding begin_line to it.  It worked as I expected; the cursor always goes to column 1.  I don't know how you are trying to do the key binding, perhaps you aren't unbinding first?

PChady

  • Community Member
  • Posts: 18
  • Hero Points: 1
Re: <Home> key not taking me to col 1.
« Reply #5 on: November 21, 2007, 04:43:02 PM »
Hi -
I was looking for the same change as the original poster:  column 1 only for HOME key.
This thread helped.

Your replies helped me to find the key-bindings window, which I fiddled with for a bit.
Originally I was looking in the general options windows, but couldn't find anything.
You know, there are so many options and settings,
it would be cool if you could SEARCH within them on a keyword like "home key"... 

In the key-bindings window:
I didn't realize it at first, but (for future readers) you can show the current binding for a given key sequence
by clicking the "Add Key..." button and then hitting the key sequence. In this case, HOME.
Then (if you wanted) you can look up the command it shows you in the command list, and unbind it.
Now you can create the new binding you want.
(the "Add key" button threw me at first because I didn't want to "ADD" a binding, I wanted to undo one...)
But I tried just giving it a new binding, and it turns out it got rid of the previous binding. So the "unbind" may not be necessary.

Then I noticed it was even easier to pick "Redefine common keys" instead of "key bindings":
It shows you the two common options for the HOME key and you can pick what function you want it to use.

I have now bound alt-Home  to the begin_line_text_toggle().

thanks,
Pete