Try
WriteThere!
It redirects all keyboard input to one window.
Click inside the target window and press F1 to redirect the input to it.
Press F1 twice fast to disable WriteThere.
Example:
Open Internet Explorer and Notepad, and place them side by side. Click inside Notepad and press F1 to redirect the keyboard. Now you can navigate your browser using the mouse, but everyting your write will end up in Notepad!
This is a beta if ever there was one! There's probably a lot of keys missing, it doesn't work with all programs, it disables global hotkeys, and so on.
Skrommel
;WriteThere.ahk
; Redirect all keyboard input to one window.
; Click the target window and press F1 to redirect.
; Press F1 twice fast to disable.
;Skrommel 2009
#NoEnv
#Persistent,On
#SingleInstance,Force
SetWinDelay,0
SetControlDelay,0
SetBatchLines,-1
SendMode,Input
;SetKeyDelay,0
hotkeys=0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,æ,ø,å,LCtrl,RCtrl,LShift,RShift,LAlt,RAlt,LWin,RWin,Appskey,Left,Right,Up,Down,Tab,PgUp,PgDn,Home,End,Delete,Insert,Esc,Space,BackSpace,Enter,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,!,?,+,-,_,*,/,\,(,),{,[,],},<,>,|,&,§,@,$,£,#,¤,µ,^,~,¨,´,',.,:,`%,``,`",`;
TOOLTIPON("WriteThere`n`nRedirect all keyboard input to one window.`nClick the target window and press F1 to redirect.`nPress F1 twice fast to disable.`n`nwww.1HourSoftware.com",10)
Return
TOGGLEHOTKEYS:
If enabled<>On
enabled=On
Else
enabled=Off
TOOLTIPON("WriteThere " enabled)
Loop,Parse,hotkeys,`,
{
Hotkey,$*%A_LoopField%,SEND,%enabled%
Hotkey,$*%A_LoopField% Up,SEND,%enabled%
}
Hotkey,$*`,,SEND,%enabled%
Hotkey,$*`, Up,SEND,%enabled%
Return
SEND:
;TOOLTIPON(A_ThisHotkey)
StringTrimLeft,key,A_ThisHotkey,2
ControlSend,%ctrl%,{%key%},ahk_id %win%
Return
F1::
If enabled=On
If A_PriorHotkey=F1
If A_TimeSincePriorHotkey<999
{
Gosub,TOGGLEHOTKEYS
Return
}
If enabled<>On
Gosub,TOGGLEHOTKEYS
win:=WinExist("A")
Loop
{
parent:=DllCall("GetParent",UInt,win)
If parent=0
Break
win:=parent
}
ControlGetFocus,ctrl,ahk_id %win%
winGetClass,class,ahk_id %win%
TOOLTIPON("Keyboard redirected to `n" ctrl " in `n" class)
Return
TOOLTIPON(tip,delay=3)
{
ToolTip,%tip%
SetTimer,TOOLTIPOFF,% delay*-1000
}
TOOLTIPOFF:
ToolTip,
Return