Jump to content

Function Keys to type text into current active window


Recommended Posts

Hello to all...

So, I have a problem and I could use some advice.

Problem:  I had a couple of strokes that reduced my ability to type @ 120 WPM to single finger typing.  That sucks, but I still have "things to do".

I'm looking for a solution that would help me improve my situation.  In short, for example, I routinely have to type my UID and PW into various screens including SSH.  We'll call that the active window (yeah, operating a mouse is also interesting).  I'd like to remap my function keys 1-12 so I can be in the active window and hit the appropriate function key to type "password" and enter.  I figure that if I can do this I can make labels to put above the function keys and streamline input to get logged in.

Any suggestions would be appreciated.

Link to comment
Share on other sites

I'll take a look at PhraseExpress - it might be a doable solution if I can attach Fkeys to 'phrases' - in my case, 10-24 character strings with odd characters.  An offsite password manager is out for me.  Thanks!

Link to comment
Share on other sites

If you feel like doing a bit a programming, you could create an ini file that would associate the hotkeys with the phrases you want.  And use HotKeySet to Send the phrase.  Not very complex script IMO.

Link to comment
Share on other sites

Danp2 - I'll look into self-hosting the password manager - wondering how that would work with multiple devices, cell phone, tablet so I can deploy the solution across them.

I wouldn't have so much of an issue but I've had to remediate a couple of companies that used PWM's which were compromised - and the ensuing sh*tstorms which followed.

Link to comment
Share on other sites

Nine - the ini wouldn't be a problem and could be replicated to my main machines...  I'd probably be looking guidance on the AutoIt side so I can ensure it works properly, but this may be an option.

I was surprised that I didn't find an application out there that would do exactly this job.

Link to comment
Share on other sites

@drbob001 Here to get you started :

#include <Array.au3>
#include <Constants.au3>

Opt("MustDeclareVars", True)

HotKeySet("{ESC}", Terminate)

Global $aKey = IniReadSection("Test.ini", "Keys")
;_ArrayDisplay($aKey)

For $i = 1 To $aKey[0][0]
  If Not HotKeySet($aKey[$i][0], SendPhrase) Then Exit MsgBox($MB_OK, "Error", "Invalid key set")
Next

While Sleep(100)
WEnd

Func SendPhrase()
  For $i = 1 To $aKey[0][0]
    If $aKey[$i][0] = @HotKeyPressed Then Return Send($aKey[$i][1])
  Next
EndFunc

Func Terminate()
  Exit
EndFunc

An example of the ini file :Test.ini

Link to comment
Share on other sites

11 hours ago, Nine said:

@drbob001 Here to get you started :

 

I will give this a try and see how it works out - it looks like a start to, hopefully, solving this problem.  Thanks!

Edited by Jos
move comment out of the quoted text.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...