Search code examples
metalmetalkit

Get mouse and keyboard input in Metal in Xcode


How are people creating games in Metal that require keyboard and mouse input? I searched the answer by looking at the Apple Documentation for Metal but I can't find a solution. Any solutions?


Solution

  • Metal is about rendering graphics and doing certain kinds of computation with the GPU. It's not a full app/game framework. It doesn't interact with the mouse or keyboard.

    Metal is used within an app that is based on some other app framework, such as Cocoa. Keyboard and mouse input are handled in the normal way for a Cocoa app.