Back

background typing

#1
Is there a way to do the following? Maybe I'm having a brain glitch about possibility/impossibility, but I'm always wanting to do this and can't recall being able to...

If I'm watching something fullscreen, for example, and I want to type some notes while I'm watching, into my main text editor, without switching focus/pausing the video or interrupting my viewing. Fullscreen or not, really. Just to have the program set up so I can like, hit a hotkey and set up a process to have keyboard input go into a background program.

This capability would be nice in general and will tide me over till I procure an iPod Touch/tablet. ;p
Reply
#2
You can use an AutoHotKey script.

Here is one that sets up F5 to switch to Notepad++ and F9 to switch to Media Player Classic:

Code:
SetTitleMatchMode, 2

F5::

IfWinExist Notepad++
{
  WinActivate
}

return

F9::

IfWinExist Media Player Classic
{
  WinActivate
}

return
Or if that's too intrusive, here's one that will record all keystrokes to a file called key_log.txt:

Code:
Loop
{
  Input, UserInput, C T1
  FileAppend, %UserInput%, C:\key_log.txt
}
Reply
#3
Hmm I'll try the second one and see how that works. So I guess you've never heard of being able to switch focus in terms of input but not output, so to speak? i.e. To switch to keyboard input specific to a target program while retaining the screen output of the software previously in focus?
Reply
May 16 - 30 : Pretty Big Deal: Save 31% on all Premium Subscriptions! - Sign up here
JapanesePod101
#4
Okay, I think the following script is exactly what you want. Currently it is setup for Notepad++.

To setup for your favorite editor, change the "classNN" and "title" lines of the script.

To get the "classNN" run the "AutoIt3 Window Spy" tool which comes with AutoHotKey. Then click inside your editor. The "AutoIt3 Window Spy" tool will show the ClassNN on the 10th line.

The "title" is just the title of the program. Partial titles are allowed. For example the full title could be "C:\Temp.txt - Notepad++". You can just use "Notepad++".

; ------- START ---------

; This script sends key presses (for most keys) to Notepad++

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2

classNN = Scintilla1
title = Notepad++

keys = ``1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./

; Create hotkeys for lowercase chars
Loop Parse, keys
HotKey %A_LoopField%, MyHotkey

; Create hotkeys for uppercase chars
Loop Parse, keys
HotKey +%A_LoopField%, MyHotkey

MyHotkey:
ControlSend, %classNN%, %A_ThisHotkey%, %title%
return

Space::
Tab::
Enter::
Backspace::
Delete::
Insert::
Home::
End::
PgUp::
PgDn::
Up::
Down::
Left::
Right::
Numpad0::
Numpad1::
Numpad2::
Numpad3::
Numpad4::
Numpad5::
Numpad6::
Numpad7::
Numpad8::
Numpad9::
NumpadDot::
NumpadDiv::
NumpadMult::
NumpadAdd::
NumpadSub::
NumpadEnter::
ControlSend, %classNN%, {%A_ThisHotkey%}, %title%
return

; ------- END---------
Edited: 2010-10-31, 12:03 am
Reply
#5
Amazing!!!

Although I can't get it to work w/ Ultraedit, works w/ Notepad. Ultraedit throws off some weird long alphanumeric string instead of simple name and stuff. Also, IME doesn't work and I was mostly going to use it for Japanese, but I guess I can just use ローマ字. How do I go about setting it up so it triggers/ends via hotkey? Right now I'm just double-clicking the .ahk file I made from your script.

Thanks!

Edit: Edited version still doesn't run UltraEdit but it's really no big deal. Notepad is fine, just wanted something simple. And I compiled the .ahk into an .exe so that'll be easy to trigger. ;p Thanks again!
Edited: 2010-10-31, 12:14 am
Reply
#6
nest0r Wrote:Also, IME doesn't work and I was mostly going to use it for Japanese, but I guess I can just use ローマ字
I haven't been able to figure this out yet.

nest0r Wrote:How do I go about setting it up so it triggers/ends via hotkey?
Put this script in the same directory as the previous script. It assumes that the previous script is named "SendKeysToNotepad++.ahk". Press F5 to trigger. Press F9 to end.

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

F5::
Run SendKeysToNotepad++.ahk
return

F9::
DetectHiddenWindows On
SetTitleMatchMode 2
WinClose SendKeysToNotepad++.ahk - AutoHotkey
return
Edited: 2010-10-31, 12:20 am
Reply
#7
Even better, thanks.

Maybe the Japanese IME has something to do with this but w/ different locale code (http://www.autohotkey.com/docs/misc/Languages.htm)?

http://www.autohotkey.com/forum/topic27011.html

or: http://www.autohotkey.com/forum/topic59088.html
Edited: 2010-10-31, 12:32 am
Reply
#8
What I'm wanting to use this for at the moment, in case anyone's wondering, is simply to take notes while focusing on other media without having to constantly switch around. While watching a video, if I hear interesting words I might type them out real quick, for example. I tend to take copious notes, on everything, but it's always a pain to switch window 'focus', pause, etc.

Thanks to the programmer god cb4960 I can now have seamless notetaking!
Edited: 2010-10-31, 12:39 am
Reply
#9
By the way, if there's a way to also ctrl+v and empty clipboard contents to Notepad, that'd be just about perfect. ;p

So it'd be like: copy some text, f5, paste and have it go into notepad, f9.
Edited: 2010-10-31, 1:40 am
Reply
#10
nest0r Wrote:By the way, if there's a way to also ctrl+v and empty clipboard contents to Notepad, that'd be just about perfect. ;p

So it'd be like: copy some text, f5, paste and have it go into notepad, f9.
Add the following snippet to the script. Whenever ctrl+v is pressed, it will send the contents of the clipboard to notepad++.

^v::
ControlSend, %classNN%, %clipboard%, %title%
return
Reply
#11
Good god man, you've done it. You're a fantastic human being. A mensch.
Reply
#12
BTW, I forgot to mention you omitted the 'a'. Not sure if that was deliberate. The way I have it is "asdfghjkl" rather than the above "sdfghjkl" and it works fine. When I first noticed the missing 'a' I thought I was typo-ing, haha. Maybe I was proving that theory correct: http://forum.koohii.com/showthread.php?tid=6622

I also changed the toggle hotkey to something less common, but I guess that's not something that needs commenting on.
Edited: 2010-10-31, 12:13 pm
Reply
#13
nest0r Wrote:BTW, I forgot to mention you omitted the 'a'. Not sure if that was deliberate. The way I have it is "asdfghjkl" rather than the above "sdfghjkl" and it works fine.
Hmm. I went go edit my post, but I didn't see the typo.
Reply
#14
cb4960 Wrote:
nest0r Wrote:BTW, I forgot to mention you omitted the 'a'. Not sure if that was deliberate. The way I have it is "asdfghjkl" rather than the above "sdfghjkl" and it works fine.
Hmm. I went go edit my post, but I didn't see the typo.
That is weird. It was also missing the backslash before the 'a'. Ohh, I know what it is, it's a formatting thing specific to my browsing. My bad. ;p
Reply
#15
nest0r Wrote:Is there a way to do the following? Maybe I'm having a brain glitch about possibility/impossibility, but I'm always wanting to do this and can't recall being able to...

If I'm watching something fullscreen, for example, and I want to type some notes while I'm watching, into my main text editor, without switching focus/pausing the video or interrupting my viewing. Fullscreen or not, really. Just to have the program set up so I can like, hit a hotkey and set up a process to have keyboard input go into a background program.

This capability would be nice in general and will tide me over till I procure an iPod Touch/tablet. ;p
It's called having a second monitor. XD I literally dunno how I would manage without a dual screen setup.

More seriously, for quick note taking, I love OneNote. Just hitting Start+N pops up a new OneNote window you can jot a note into, and you don't need to worry about saving or anything. And it synchs between the various computers in my house rather easily.
Reply
#16
Daichi Wrote:
nest0r Wrote:Is there a way to do the following? Maybe I'm having a brain glitch about possibility/impossibility, but I'm always wanting to do this and can't recall being able to...

If I'm watching something fullscreen, for example, and I want to type some notes while I'm watching, into my main text editor, without switching focus/pausing the video or interrupting my viewing. Fullscreen or not, really. Just to have the program set up so I can like, hit a hotkey and set up a process to have keyboard input go into a background program.

This capability would be nice in general and will tide me over till I procure an iPod Touch/tablet. ;p
It's called having a second monitor. XD I literally dunno how I would manage without a dual screen setup.

More seriously, for quick note taking, I love OneNote. Just hitting Start+N pops up a new OneNote window you can jot a note into, and you don't need to worry about saving or anything. And it synchs between the various computers in my house rather easily.
No. Believe me, what you're describing is the kind of stuff I've already thought of and experimented with ages ago. It is not what I wanted when posting above, and nowhere near as exact or near the level of awesome cb4960 has enabled for me in terms of seamless notetaking.

Surely it's not just me. Anyone else tried this script and experienced the giddy feeling of triumph, having resolved a solution that has plagued humankind since the beginning of time?! Okay I'm exaggering a little bit in that last part.
Edited: 2010-11-09, 3:51 am
Reply
#17
We all know about graphomania, but it seems typomania is already taken.
Behold, anthropologists of the future, the mighty typorrhea.
But the term sounds a little to pejorative to me (cf logorrhea). Maybe typophilia, typophilist is better. I'll let posterity judge.
Reply
#18
nest0r Wrote:Surely it's not just me. Anyone else tried this script and experienced the giddy feeling of triumph, having resolved a solution that has plagued humankind since the beginning of time?! Okay I'm exaggering a little bit in that last part.
Haha, I see. Then just ignore me.
Reply
#19
The AutoIt script is very interesting.

You may also be able to use Stickies. There is a global shortcut (ie. activate whatever application has focus) that will show/hide stickies. I can't remember for sure but the last sticky you edited should have focus after you press that shortcut. So you could create one big sticky, or a small one that shows in a corner, or you can keep it on top of the video. I think you can even set the opacity. You can export them or tell the app to save the stickies to a specific folder.

I really miss this app since moving to OS X.
Reply
#20
Umm, could someone clarify something for me. Why cant you just set your video player window to 'Always on top' :S??
Reply
#21
Haha, none of those does what I wanted either. Only the script cb4960 wrote. ;p

Here is my ode to this script.

You should set it up and run it while notetaking to fully understand what I'm saying. Keep in mind also that I mentioned more than one type of media, video was just an example. Video might not have been the best example because it doesn't require you to do anything, input-wise—I always had the option to just maximize it to the side of the screen (drag it to the side in Windows 7), i.e. I could have left it a matter of screen real estate. But there still would have been the issue of having to switch focus if I wanted to do something with video say with the mouse, while typing. There's also the important visual element, I find no need to look at the text window while typing notes, so why have that visual shifting, be it with resized windows or extra screens (by shifting I mean mechanically with monitor or with the eyes--the former has a distracting compulsion to use the latter, however)?

So being able to fullscreen a video and maintain that continuous visual contact, hit a key and start typing while continuing to watch and listen--all the while being able to pause, backscan, adjust volume, etc. the video with the mouse while typing. Being able to do that rather than switch input/focus with windows/screen area (single or dual), try it, I'm not kidding, it adds up if you're a heavy notetaker like myself. What I'm really seeing improvements for, productivity/workflow-wise, is when reading and taking notes. My god! Because reading is a much more visually-intensive task and additionally I spend much more time using the mouse, scrolling and clicking/dragging text. And keep in mind with this script you can copy/paste into the background window, so this also allows you, if you use Stardict the way I do, to send words you look up and/or their definitions to that window.

Ahh, the liberation of unchaining keyboard input from the visual domain and the mouse/window focus. It's like I'm not even taking notes, I'm just thinking as I go about my virtual day, and my fingers and the text record it for me.

I'm also noticing it while browsing.
Edited: 2010-11-09, 1:44 pm
Reply
#22
Didn't read all the posts before replying, but there is a very easy way of doing what was described in the first post.

Player: media player classic home cinema.
Set it to always on top while playing.
Dont set it to full screen, but you can maximize the window, which makes it "almost full screen".
Open notepad and get it ready for typing.
Start playing the video. Click notepad on the taskbar. Notepad now has focus and you can type in it, but the video stays on top.
Reply
#23
Zarxrax Wrote:Didn't read all the posts before replying, but there is a very easy way of doing what was described in the first post.

Player: media player classic home cinema.
Set it to always on top while playing.
Dont set it to full screen, but you can maximize the window, which makes it "almost full screen".
Open notepad and get it ready for typing.
Start playing the video. Click notepad on the taskbar. Notepad now has focus and you can type in it, but the video stays on top.
Not at all what I wanted, as explained above. This sort of thing is what I already thought of, when you were just a glint in your grandmother's eye! But thanks for the partial effort, it's the thought that counts. ^_-

Oh cb4960 and balloonguy, you're the only ones who understand nest0r.
Edited: 2010-11-09, 2:03 pm
Reply
#24
nest0r Wrote:Oh cb4960 and balloonguy, you're the only ones who understand nest0r.
Glad to be of service Smile
Reply