James Posted July 6, 2007 Posted July 6, 2007 (edited) Hey,With lots and lots of help from Toady I have managed to create my own Keyboard layout!expandcollapse popup#cs Name: Origin Keyboard Layout Author: JBr00ks aka James Brooks Description: Original Keyboard Layout A+8 B+8 C+8 etc Thanks to: Toady and RazerM! #ce #include <Misc.au3> HotKeySet("{F9}", "MyExit") #NoTrayIcon If _Singleton("OriginKeyboardLayout", 1) = 0 Then MsgBox(262144, "Error", "Origin Keyboard Layout is already running!") Exit EndIf $DLL = DllOpen("user32.dll") $File = @ScriptDir & '\keys.txt' Global $aKeys[26] = ['41', '42', '43', '44', '45', '46', '47', '48', '49', '4A', '4B', '4C', '4D', '4E', '4F', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5A'] For $i = 0 To 25 HotKeySet(Chr(Number("0x" & $aKeys[$i]) + 32), "Block") ;add 32 to convert to lowercase A -> 65 a -> 97 Next For $i = 0 To 25 HotKeySet(Chr(Number("0x" & $aKeys[$i])), "Block") Next While 1 Sleep(1) keys() WEnd Func Block() EndFunc ;==>Block Func keys() For $i = 0 To 25 If _IsPressed($aKeys[$i], $DLL) Then $sChar = _GetChar(Number("0x" & $aKeys[$i]) + 32) If (_IsPressed("10", $DLL) And Not _GetCapsState()) or (Not _IsPressed("10", $DLL) And _GetCapsState()) Then HotKeySet(Chr(Asc($sChar) - 32)) Send(Chr(Asc($sChar) - 32), 1) HotKeySet(Chr(Asc($sChar) - 32), "Block") Else HotKeySet($sChar) Send($sChar, 1) HotKeySet($sChar, "Block") EndIf While _IsPressed($aKeys[$i], $DLL) ;key is held down.. Sleep(1) WEnd EndIf Next EndFunc ;==>keys Func _GetCapsState() $avRet = DllCall($DLL, "int", "GetKeyState", "int", 20) Return $avRet[0] EndFunc ;==>_GetCapsState Func _GetChar($iChar) $iChar += 8 If $iChar > 122 Then $iChar = 96 + $iChar - 122 Return Chr($iChar) EndFunc ;==>_GetChar Func MyExit() Exit EndFuncDo not press shift or have the caps lock on, shift and pressing a key is yet to be added.Sample Text:PMTTW UG VIUM QA RIUMA IVL Q TWDM ICBWQB!Translated Text:hello my name is james and i love autoit!Each character is moved 8 places to the right, e.g. x=g, z=h etc.Thanks to RazerM for the newer better smaller version!This script is not a virus. It is a new keyobard layout.Keyboard LayoutDownload Origin Keyboard Layout 2 From:OriginK2.zip (252.2K) Number of downloads: Now works with Caps lock and shift!-JamesEdit: Changed topic title.Thanks to RazerMUpdated script x2! Edited July 8, 2007 by JBr00ks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Xenobiologist Posted July 6, 2007 Posted July 6, 2007 Hi, why are you doing this while typing and not afterwards? Would be much easier. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
James Posted July 6, 2007 Author Posted July 6, 2007 I dont get you? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Wolffe Posted July 6, 2007 Posted July 6, 2007 I think that what he means is that it would be easier to essentially translate what you type after you have typed it. Instead of changing it while it is typing. But I think that would defeat the purpose of having this as a 'new keyboard' layout. And it would fall under of of an encryption style of program. I think. :-)
jvanegmond Posted July 6, 2007 Posted July 6, 2007 I dont get you?I think he is referring to, typing the whole sentence and then putting it in a GUI to shift all characters 8 to the right.That is not the whole point, and I understand. github.com/jvanegmond
RazerM Posted July 6, 2007 Posted July 6, 2007 (edited) @JBr00ks I got shift key working now, but caps lock doesnt work (I could use word automation UDFs but i'd rather use a different method) expandcollapse popup#cs Name: Origin Keyboard Layout Author: JBr00ks aka James Brooks Description: Original Keyboard Layout A+8 B+8 C+8 etc #ce #include <Misc.au3> $DLL = DllOpen("user32.dll") $File = @ScriptDir & '\keys.txt' Global $aKeys[26] = ['41', '42', '43', '44', '45', '46', '47', '48', '49', '4A', '4B', '4C', '4D', '4E', '4F', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5A'] For $i = 0 To 25 HotKeySet(Chr(Number("0x" & $aKeys[$i]) + 32), "Block") ;add 32 to convert to lowercase A -> 65 a -> 97 Next For $i = 0 To 25 HotKeySet(Chr(Number("0x" & $aKeys[$i])), "Block") Next While 1 Sleep(1) keys() WEnd Func Block() EndFunc ;==>Block Func keys() For $i = 0 To 25 If _IsPressed($aKeys[$i], $DLL) Then $sChar = _GetChar(Number("0x" & $aKeys[$i]) + 32) If _IsPressed("10", $DLL) Then HotKeySet(Chr(Asc($sChar)-32)) Send(Chr(Asc($sChar) - 32), 1) HotKeySet(Chr(Asc($sChar)-32), "Block") Else HotKeySet($sChar) Send($sChar, 1) HotKeySet($sChar, "Block") EndIf While _IsPressed($aKeys[$i], $DLL) ;key is held down.. Sleep(1) WEnd EndIf Next EndFunc ;==>key Func _GetChar($iChar) $iChar += 8 If $iChar > 122 Then $iChar = 96 + $iChar - 122 Return Chr($iChar) EndFunc ;==>_GetChar Edited July 6, 2007 by RazerM My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 6, 2007 Author Posted July 6, 2007 Thanks RazerM! So there was no bug which we were talking about. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted July 6, 2007 Author Posted July 6, 2007 Erm, RazerM. There is a problem. This is what the output is for James, 8O[sa. Only the letters need moving forward. The layout is only for letters. And also you forgot: Func _GetChar($iChar) $iChar += 8 If $iChar > 90 Then $iChar = 64 + $iChar - 90 ;~ If _IsPressed("10", $DLL) Then ;shift? Return Chr($iChar) EndFunc ;==>_GetChar Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
RazerM Posted July 6, 2007 Posted July 6, 2007 I didn't include the updated _GetChar Function, it's edited in my post now My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 7, 2007 Author Posted July 7, 2007 (edited) Also, its adds numbers to the alphabet??Edit: My mistake. I missed the "Updated" _GetChar func! Edited July 7, 2007 by JBr00ks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted July 7, 2007 Author Posted July 7, 2007 Updated! Press F9 to exit the program! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
RazerM Posted July 7, 2007 Posted July 7, 2007 You didn't add the changes so that if Caps Lock is on and shift is pressed, lowercase letters are produced. Update with the following functions. Func keys() For $i = 0 To 25 If _IsPressed($aKeys[$i], $DLL) Then $sChar = _GetChar(Number("0x" & $aKeys[$i]) + 32) If (_IsPressed("10", $DLL) And Not _GetCapsState()) or (Not _IsPressed("10", $DLL) And _GetCapsState()) Then HotKeySet(Chr(Asc($sChar) - 32)) Send(Chr(Asc($sChar) - 32), 1) HotKeySet(Chr(Asc($sChar) - 32), "Block") Else HotKeySet($sChar) Send($sChar, 1) HotKeySet($sChar, "Block") EndIf While _IsPressed($aKeys[$i], $DLL) ;key is held down.. Sleep(1) WEnd EndIf Next EndFunc ;==>keys Func _GetCapsState() $avRet = DllCall($DLL, "int", "GetKeyState", "int", 20) Return $avRet[0] EndFunc ;==>_GetCapsState My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 7, 2007 Author Posted July 7, 2007 Whoops, must of copied the wrong version. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
James Posted July 7, 2007 Author Posted July 7, 2007 You can now download the actual Windows Layout from above or:Origin_i386.msi (112K) Number of downloads: Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
RazerM Posted July 7, 2007 Posted July 7, 2007 Origin.dll not found in the msi. What does it do? My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 7, 2007 Author Posted July 7, 2007 Oh, I forgot this:Origin.dll (6K) Number of downloads: Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
RazerM Posted July 7, 2007 Posted July 7, 2007 Hmmm, I eventually got it to install, but when i changed my keyboard settings to origin layout it didn't work. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 8, 2007 Author Posted July 8, 2007 (edited) Hmm,I created it with Microsoft Keyboard Layout Creator, what does that tell you/ I havent yet tried it, but I will now.What processor arch do you use? AMDia64? i386? AMD 64?Edit:Everything works fine for me.setup.exe (139.5K) Number of downloads: Edited July 8, 2007 by JBr00ks Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
RazerM Posted July 8, 2007 Posted July 8, 2007 @ProcessorArch says X86 My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
James Posted July 8, 2007 Author Posted July 8, 2007 I will just put the created folder in a zip origin.zip (252.7K) Number of downloads: Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now