Hey Guys,
Thanks for the input on this. Your exmaples and discussion helped me flush it out. So, I think I've got it working by dynamically remapping the keys.
Let me backup before delivering the script. When I first did this in Windows 10 years ago in Windows 3.1 (Oh Gawd! Can it really be?!

- show 'n awe man), well I used a tool called Bridge Batch, made by a company now long out of business. At the time it cost $300 or so! Yee eee Ouch, man!. I protest too much, my employer purchased it. Anyway, despite the fact that it is 16bit the Win Hooks API has remained compatible. Somewhat amazing, wouldn't you say ay! There were quirks mind you and some 32 bit programs refused to obey.
So what exactly am I doing. I mentioned that this idea came from the WordStar word processor keyboard (and they may have got it somewhere else for all I could know). In the far off DOS days I used an editor written in assembler called QEdit. Man was that guy fast! Well QEdit used the WordStar keyboard. The
primary objective of this keyboard was to allow you to edit withoug ever having to remove your hand from the home row. To do this comfoortably it is first necessary to have the Ctrl key on the home row as it was in wonderful days of yore.
You will notice the little diamond formed by the keys E, D, X, S. In WS key land you held down Ctrl, having to release it would totally ruin the effect - it must act just like the shift key - while pressing these keys to move the cursor around, for example:
Ctrl-E = Up
Ctrl-D = Right
Ctrl-X = Down
Ctrl-S = Left
Lovely, ay, what! With your left hand never leaving the comfort of home, you can move all around. But that is just the start of course. There are more functions that you can accomodate by just using one key. So the next step would be to combine two keys and make them mean something. For example, still holding down Ctrl, again, never having to release it to release the keys, you would type:
Ctrl-KL= Select from cursor to EOL
Ctrl-KK = Cut (it would send a Ctrl-X )
Ctrl-KO = Cut
And so on and so forth etc, etc. Now frankly, I have modified there combinations quite a bit so that left and right hands alternate more, because this seemed to be faster at the time for instance:
Ctrl-LS = Start of Line
Ctrl-LD = End of Line
The beauty of this, you might notice, is that S was Left and D was right so in a way the two keystroke combination has just made the movement bigger. Right well that's enough of that. The
second objctive was to be able to use this *reallly wonderful* editing technique in all my windows programs when I switched to Windows. So no matter what app., you are in and in spite of any of its quirks, you can bend it to you will. What I would do was have a hotkey to load a program say Ctrl-2 for Outlook, and at the same time load the hotkey map for Outlook. This was a bit of a pain because you had to remember to do that. Later using Macro Toolworks, which used window hooks to watch the interface, I was able to load my hotkeys auto-magically. BOY! Is this NERDY! I forgot how WHACKED

this really is. OK, OK, the script already:
Code:
/*
_____________________________________________________________________________________________________
Name:
Edit-From-Home-Row-Mania
Purpose:
Creates Ye Olde WordStar Keyboard effect. Why?
1) Everything in Home Row: By using the Ctrl key, all editing can be done from the home row -
a boon especially for horrid laptop keyboards
2) Common Key Interface: Key actions can be made the same accross all applications
Created:
KHensley Th.20070705.12:39: proof of concept (incomplete)
Updates:
Notes:
? Goto only appears to work forward, is that right?
____________________________________________________________________________________________________
*/
; ...Er, um, forgive the Goto's - it just kind of works in this case. The are used consistently
#SingleInstance Force
#UseHook On
;Capslock::Ctrl
;LAlt::Capslock
LBL_Main:
Gosub LBL_Main_KeyMap ;define the base hotkeys
Gosub LBL_ScriptEnd
;******************************
;Key Actions
;******************************
LBL_Left:
SendInput {Left}
Return
LBL_Right:
SendInput {Right}
Return
LBL_Delete:
SendInput {Delete}
Return
LBL_StartOfLine:
SendInput !{Home}
Sleep, 500
Goto LBL_Main_KeyMap
LBL_EndOfLine:
SendInput !{End}
Sleep, 500
Goto LBL_Main_KeyMap
LBL_SelectFromCursorToEOL:
SendInput +{End}
Hotkey, ^l, LBL_L_KeyMap
Sleep 500
Goto LBL_Main_KeyMap
LBL_GotoLineNumber:
SendInput ^{g}
Sleep 500
Goto LBL_Main_KeyMap
LBL_CopySelection:
SendInput ^{c}
Sleep 500
Goto LBL_Main_KeyMap
LBL_CutSelection:
SendInput ^{x}
Hotkey ^k, LBL_K_KeyMap
Sleep 500
Goto LBL_Main_KeyMap
LBL_Insert:
SendInput ^{v}
Sleep 500
Goto LBL_Main_KeyMap
;******************************
;Hotkey Maps
;******************************
LBL_Main_KeyMap:
;The following hotkeys, and their associated procedures will act to create a two keystroke hotkey effect
;that stays active while the Ctrl key is held down constantly.
;^k::Goto LBL_K_KeyMap
;Hotkey, ^k, LBL_K_KeyMap
;Hotkey, ^k, Off, UseErrorLevel
;Hotkey, ^l, Off , UseErrorLevel
;Hotkey, ^l, LBL_L_KeyMap ; ... this doesn't work ???
Hotkey ^s, LBL_Left ; cursor left
Hotkey, ^d, LBL_Right ; cursor right
Hotkey, ^g, LBL_Delete ; delete
;^s::Send {Left}
;^d::Send {Right} ; cursor right
^e::SendInput {Up} ; cursor up
^x::SendInput {Down} ; cursor down
^a::SendInput ^{Left} ; word left
^f::SendInput ^{Right} ; word right
^r::SendInput {PgUp} ; page up
^c::SendInput {PgDn} ; page down
^i::SendInput {Tab} ; tab in
^o::SendInput +{Tab} ; tab out
^h::SendInput {BackSpace} ; backspace
^t::SendInput +{End}{Delete} ; delete from cursor to end of line
;Hotkey, ^l, Off
;Hotkey, ^k, Off
;Hotkey, ^l, On
;HotKey, ^k On
;^Hotkey, ^k, LBL_K_KeyMap
;^Hotkey, ^l, LBL_L_Keymap
^l::Gosub LBL_L_KeyMap ;this works but ...
^k::GoSub LBL_K_KeyMap
;^k::Gosub LBL_K_KeyMap ;
Goto LBL_ScriptEnd
;Return ;End Main_KeyMap
LBL_K_KeyMap:
;Purpose:
; Remaps keys when the Ctrl-K is pressed
; The "K" keys are generally used for selecting text and operating on it (cut, paste, etc)
;Hotkey, ^l, Off
Hotkey, ^l, LBL_SelectFromCursorToEOL
Hotkey, ^i, LBL_Insert
Hotkey, ^o, LBL_CopySelection
Hotkey, ^k, LBL_CutSelection
Return ;End K_KeyMap
LBL_L_KeyMap:
;Purpose: Remaps keys when Ctrl-L is pressed
;The "L" keys generaly used for moving the cursor around a document
Hotkey, ^s, LBL_StartOfLine
Hotkey, ^d, LBL_EndOfLine
HotKey, ^g, LBL_GotoLineNumber
Return ;End L_KeyMap
LBL_ScriptEnd:
Yeah, yeah, I know lot's of Gotos. I don't know if there is another way of doing this with AHK and that is where you expers will come in. This script works for for SciTE and all that remains now is to figure out how to load a new set of keys for each app. Well, that and finishing all the scripts for the 15 or so apps that I've written them for.
It took me sometime to figure out how to get it all to work in AHK. With some of the configurations in the procedures, there was some really strange behavior, where the hotkeys would just stop working. It seemed to depend on where I put the remap commands with HotKey.
I would count your opinions most valuable. I have been happily editing this with the aid of AHK and except for the fact that this text box uses the standard Ctrl-End to go to the end of a line and SciTE uses a non-standard Alt-End therefor rendering my Ctrl-KD unusable at the present, I'm a happy man. You AHK developer-type guys really ROCK man!
Thanks,
Kenton[/code]