- Home /
How to use Arrow Key for MenuItem Hotkey
I want to use Alt + ↑ or Alt + ↓ .
&U
(Alt + U) works fine.
But
&UP
_UP
%#&UP
are not working.
And other special keys (e.g. PGUP) also not working.
cf. https://learn.unity.com/tutorial/editor-scripting#5c7f8528edbc2a002053b5f9
These are the supported keys (can also be combined together):
% – CTRL on Windows / CMD on OSX
# – Shift
& – Alt
LEFT/RIGHT/UP/DOWN – Arrow keys
F1…F2 – F keys
HOME, END, PGUP, PGDN
How can I try for using Alt + ↑/↓ ?
Answer by Jeanettegh · Aug 28, 2021 at 09:38 AM
Alright so I'm trying to make a menu of quick shortcuts for a bunch of operations that are slightly less used, so I can never remember the shortcuts but the layer I use to switch ijkl to arrow keys doesn't respond in the menu. but my actual arrow keys work just fine for navigating the menu.
Menu Code:
OptionsMenu(){
Menu, MainMenu, Add
Menu, MainMenu, Add
Menu, MainMenu, deleteAll
Menu, MainMenu, Add, Google, menuGoogle
Menu, MainMenu, Add, Google with prefix, menuGoogle2
Menu, AppMenu, Add, Calculator, menuCalculator
Menu, MainMenu, Add, Apps, :AppMenu
Menu, MainMenu, Show
ControlFocus, MainMenu, menuGoogle, MainMenu
return
menuGoogle:
Google1()
return
menuGoogle2:
Google2(clip())
return
menuCalculator:
Run, Calc.exe
return
}
arrow key code:
RAlt::F13 #if GetKeyState("F13") { i:: Up j:: Left k:: Down l:: Right
return
}
if
My arrow key shortcut works everywhere else, so I'm pretty confused by this. Thanks for at least taking the time to read this post!
Your answer
Follow this Question
Related Questions
Make a pop up panel asking if I am sure I want to buy a specific item 0 Answers
Editor scripting - How to show the Assets menu as a context menu 1 Answer
It's possible to create MenuItems with out attributes? 1 Answer
MenuItem Glitch: Editor Script MenuItem Calling Wrong Option From Unity Help Menu 0 Answers
Ability to define custom help menu (PDF) 2 Answers