- Home /
How to reset default hotkeys for editor?
This may seem a bit crazy but somehow (and I don't know how) I "accidentally" set a number of hotkeys to add a specific scripts...! for example, when I have one of my game objects selected and I press (shift+d) script number 1 gets assigned as one of its components.
Now the main problem is that even when I'm renaming my objects and other stuff (shift+d) still adds the component and doesn't type "D" (capital d) as it's supposed to! (I also have this problem with "shift+N" and "shift+O" keys)
in Edit>Preferences under the "Keys" tab I clicked Use Defaults but it didn't solve the problem.
can any one help me with this please...
that's my problem! I DON'T $$anonymous$$NOW!!! somehow it just happened...! I know it sound kinda dumb, but it's true...
Answer by DoTA_KAMIKADzE · Apr 09, 2015 at 07:57 PM
Well you or some asset code that you use does it by using MenuItem. You need to find it out.
I'm building everything from scratch so there isn't any special asset that may cause this, I'm not using $$anonymous$$enuItem but I checked my codes anyway just to make sure and didn't find $$anonymous$$enuItem in any of them...
Thanks for the heads up, but is there anything else that might be messing with Shortcut $$anonymous$$eys...?
Could you go through all $$anonymous$$enu items in your Unity window and find out if there is any with your problematic shortcut keys? (like "Shift+D")
If you find one post here that menu item path (e.g. Ctrl+N -> File=>New Scene)
Problem SO$$anonymous$$EHOW solved!!!
I have explained it a comment below how it was solved, can you please read it and tell me if you have any idea on how it work? thanks...
Answer by samtperrin · Apr 09, 2015 at 08:46 PM
You could try deleting your EditorPrefs? I believe they are saved in the registry like PlayerPrefs - HKCU\Software\Unity Technologies\UnityEditor
Or you can run EditorPrefs.DeleteAll() - http://docs.unity3d.com/ScriptReference/EditorPrefs.DeleteAll.html
Use this at your own risk - I have not tested it.
this sounds risky, I may use it as a last resort, thanks...
I think it will reset the editor to its default state. It 'should not' break anything.
Answer by 515Dastan · Apr 10, 2015 at 07:27 AM
!!!PROBLEM SOLVED!!!
Ok I don't know how this actually works, here's the thing,
I had named a set of my scripts like BTN_Exit, I used BTN as a short form of "Button" to manage the scripts used for controlling buttons, I also had some scripts with names like BTN_Ready_Play
I checked and notice all my keys which where not typing when I hold shift are the ones that came right after underscore,
I renamed my script and removed the underscores and also unnecessary Capital letters, so for example BTN_Exit now is BtnExit
this solved the problem but I'm interested in knowing how this works and why it caused something like this...!
Your answer
Follow this Question
Related Questions
Prevent unity hotkeys in editor 0 Answers
Unity Editor hotkeys 2 Answers
Disable certain hotkeys in the editor? 0 Answers
Hotkey for play (ctrl + P) not working properly 0 Answers
Custom hot keys manager 1 Answer