Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
What if you toggle numlock?
(This does seem to be an issue with Unity 2021 that the beta is on and MacOS 13, so I'm trying to track down the specifics/workarounds)
I am using a standard external Apple keyboard, and it doesn't have a numlock. I perused System Preferences extensively, but couldn't find anything to emulate numlock functionality. I also don't have any accessibility settings enabled that would interfere with ordinary keycode generation, nor am I using any virtual layouts. It's all pretty vanilla.
I can rebind the keys, but currently the numpad is generating the same keycodes as the number row, which creates a direct (ergonomic) conflict between movement and mapped abilities. Without something like numlock that I can toggle, I can't get the numpad to generate different keycodes, so I can't resolve that conflict directly.
I could probably map movement to number keys and my abilities to function keys, but while I'm rewiring my brain I'm going to get a lot of stupid deaths by thinking that 4 dismembers but actually it walks to the left. ;)
I haven't built anything with Unity for a few years, so I'm afraid I don't know anything helpful about the newer builds that could point you in the right direction. But I'm also a career software developer (26 years and counting), so I'm savvy enough to follow orders and provide feedback if there's anything specific that you want me to try in order to help you debug.
try pressing shift delete maybe?
https://support.apple.com/guide/mac-help/if-a-numeric-keypad-doesnt-work-mchlp2366/mac#:~:text=If%20you%20have%20a%20separate,%2C%20try%20pressing%20Shift-Delete.
Not stoking your ego, but Qud really is my favorite game of all time. I grew up on PC Rogue, discovered (and abandoned) Nethack, moved to Angband (and the variants), played ADOM and ToME for over a decade, and then settled very happily on Caves of Qud. For all the enjoyment I've gotten from this game, I feel ashamed that I didn't pay you a lot more for it.
Anyway, that's why it's important enough to me to bother you about it. So really, thank you a lot, both for the game and your help.
Num row 7 produces:
- characters: 7
- unicode: u0037
- keys: 7
- key code: 0x1a
- modifiers: 0x100 (NX_NONCOALESCEDMASK)
Num pad 7 produces:
- characters: 7
- unicode: u0037
- keys: #7
- key code: 0x59
- modifiers: 0x200100 (NX_NUMERICPADMASK)
I obtained comparable results for all other keys on and off the num pad, e.g., keyboard + and num pad + produce different results. All num pad keys have NX_NUMERICPADMASK as a modifier, and no other keys set this modifier.
Using both utilities, I verified that Shift+Delete and Shift+Clear have no observable effect on the key codes produced. So I don't seem to be able to access anything like numlock functionality from my (old) Magic Keyboard. But it would appear to be that numlock is off anyway, since by default I am receiving different key codes that the num row produces.
So… this is strong evidence that we can rule out macOS Ventura as the root cause… and medium evidence that Unity 2021 is the culprit instead.
I'll see what I can dig up in the Unity forums. I might try to build a key code reporter — or see if there's already a free utility in the asset store.
I created a single object, which I named InputSolicitor, and I attached a script whose Update method used UnityEngine.Input (what Unity is apparently calling the "old" system) to write to the console log (Debug.Log). Per the official guidance[docs.unity3d.com] and my own memory from 2 years ago, I used Input.GetKeyDown with both KeyCode.Keypad7 and "[7]", which should both represent numpad 7. I verified (with breakpoints and logging statements) that Update was really being called, but the immediate mode input conditionals never triggered for any numpad 7 (or any numpad key).
So then I installed the Input System package (version 1.4.4), went to Project Settings > Player > Other Settings > Configuration > Active Input Handling and changed it from Input Manager (old) to Input System Package (new). I added a Player Input component to InputSolicitor, attached an Input Action Asset, and configured the asset to have a single input map (Player) and a single action (Move). I added an Up\Down\Left\Right Composite to Move, and I set the individual bindings to Numpad 8/2/4/6, respectively. I also went to Window > Analysis > Input Debugger > Keyboard, where I observed that the keyboard table listed different code values (labeled BIT) for 0–9 and numpad0–numpad9. I then nixed the Update method from InputSolicitor, imported UnityEngine.InputSystem, and added an OnMove method. In the method, I just added logging statements to print the Vector2 that I bound in the input action asset. OnMove only gets called if Unity routes the key codes correctly, and I verified that with an unconditional logging statement at the beginning. I observed that I could use the numpad — well, only 8/2/4/6 — but not the corresponding number row keys. And the Vector2 was set to (0.0, 1.0), (0.0, -1.0), (-1.0, 0.0), and (1.0, 0.0) as appropriate for numpad 8/2/4/6, respectively. Here's the complete implementation of OnMove:
Conclusion: The old input manager (UnityEngine.Input) in Unity 2021 no longer supports the numpad … on macOS? I can't test anything but macOS Ventura, so I can't scope the issue precisely … but the new input manager (UnityEngine.InputSystem) does support the numpad correctly on macOS (with the same scope caveat).
I'm really sorry I can't attach the Unity project or any screenshots to this for you; if you need them badly, let me know, and I'll set up a repo on GitHub with the whole project and some screenshots.
Let me know if there's anything else that I can do to support you. I am happy to contribute to a solution in any way that I can.
Appreciate the patience, we'll get it sorted!
https://www.dropbox.com/sh/y7qos8jbzpko5gb/AADv_-DSOYD5DOh7aJg1QXsca?dl=0
e: Ah I totally missed the post 2 above this, which answers this question clearly!
1. to get Unity to fix the bug
2. go forward to a newer version, or add the new input manager
3. roll beta back to older unity
So no great options; but I'll pick one and keep you updated.