matteus_71 Posted June 14, 2023 Share Posted June 14, 2023 Hello everyone! Newbie here. Something happened a while ago with my pc. I can´t get my keyboard to type @ I am only able to type it when using a virtual keyboard. Why this is, is beyond me. So...until I know why, I would like a script doing this: When I press a key on the keyboard, it will type @ I have searched help for Autoit and googled it but it has only made me more confused. How would you do it? Thanks! 20Ice18 1 Link to comment Share on other sites More sharing options...
Earthshine Posted June 14, 2023 Share Posted June 14, 2023 (edited) Sounds like a broken keyboard, or a messed up windows installation run the keyboard, troubleshooter in windows, and see what it says and see if it fixes it Edited June 14, 2023 by Earthshine matteus_71 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2023 Developers Share Posted June 14, 2023 Moved to the appropriate forum. Moderation Team matteus_71 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Earthshine Posted June 14, 2023 Share Posted June 14, 2023 Test the keyboard on another computer and see if the key works matteus_71 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Dan_555 Posted June 15, 2023 Share Posted June 15, 2023 Here, on German keyboard layout, the @ is at alt Q. If, for some reason the input language is changed to something else (by mistakenly pressing the windows + space key) the @ jumps to somewhere else. Maybe it is the case on your system ? If you really want to have a key permanently changed, then it is better to use an utility like https://github.com/randyrants/sharpkeys . you can change any key you want to be your next @ key. A single script for a single key is not so useful, imho. Some of my script sourcecode Link to comment Share on other sites More sharing options...
20Ice18 Posted June 15, 2023 Share Posted June 15, 2023 (edited) On 6/14/2023 at 11:10 AM, matteus_71 said: How would you do it? Here is a script if you really want it ; control key is a @ ; escalator is script Exithttps://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm but as other people suggested you should probably find a better way to fix your issue <Misc.au3> HotKeySet("{ESC}", "TerminateScript") Global $shouldRun = True While $shouldRun If _IsPressed("11") Then ; Check if Control key is pressed Send("@") Sleep(100) ; Pause for 100 milliseconds to prevent rapid repetition EndIf Sleep(10) ; Pause for 10 milliseconds to reduce CPU usage WEnd Func TerminateScript() $shouldRun = False Exit EndFunc let me know if it worked Edited June 15, 2023 by 20Ice18 matteus_71 1 ❤️ Link to comment Share on other sites More sharing options...
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