Hello
Just a simple request, I hope.  The sequential hitting of home should work like Visual C++.  The first home moves to the 1st character in the line, 2nd home to column 1, etc.  I find myself consistly pressing home, then ctl-right_arrow.
On the subject of home sequences, there is a bug in the current feature.  Press home and the cursor moves to column 1.  Re-position the cursor on a different line with the mouse, then press home again.  I would expect the cursor to move to the beginning of the new current line, but it moves to the beginning of the page.
Jack
			
			
									
									
						home, home, home
- 
				Jack
 
Hi Jack,
In this case save the code below to the zScript/home.lua file and rebind the current home key to use this script.

But in a way you are right
  Rather than being bound to the MoveDocumentStartEx function, for the MSVC keymap the Home key should in fact be bound to the MoveLineHome function. I will fix up the mapping.
Cheers Jussi
			
			
									
									
						Interestingly enough only just a few days ago in this thread I raised the point that many editors add their on special behaviour to many of the standard editing keys. To cut a long story short the end result is Zeus will not try to emulate every such editor using built-in keyboard functions, because the desired functionality can be achieved using as simple macro script.The first home moves to the 1st character in the line, 2nd home to column 1
In this case save the code below to the zScript/home.lua file and rebind the current home key to use this script.
Code: Select all
function key_macro()
   screen_update_disable()
   local cursor = get_cursor_pos()
   if (cursor == 1) then
     MoveLineRight()
   else
     MoveLineHome()
   end
   screen_update_enable()
   screen_update()
end
key_macro() -- run the macroJack, this is blasphemy. What you are in fact seeing is keystroke made famous by the Brief editorOn the subject of home sequences, there is a bug in the current feature.
But in a way you are right
Cheers Jussi
- 
				Guest
 
Thanks Jussi,
Thanks for the macro. I changed it to the behavour which seems intuitive to me.
Jack
function key_macro()
screen_update_disable()
local cursor_after_move = 1
local start_cursor = get_cursor_pos()
if ( start_cursor ~= 1) then
MoveLineHome()
MoveLineRight()
cursor_after_move = get_cursor_pos()
end
if (start_cursor == cursor_after_move or start_cursor == 1) then
MoveDocumentStartEx()
end
screen_update_enable()
screen_update()
end
key_macro() -- run the macro
			
			
									
									
						Thanks for the macro. I changed it to the behavour which seems intuitive to me.
Jack
function key_macro()
screen_update_disable()
local cursor_after_move = 1
local start_cursor = get_cursor_pos()
if ( start_cursor ~= 1) then
MoveLineHome()
MoveLineRight()
cursor_after_move = get_cursor_pos()
end
if (start_cursor == cursor_after_move or start_cursor == 1) then
MoveDocumentStartEx()
end
screen_update_enable()
screen_update()
end
key_macro() -- run the macro
