Keyboard and Mouse Input For Games

From EmuVR Wiki
Revision as of 08:15, 6 November 2019 by EmuVR (Talk | contribs)

Jump to: navigation, search

This is an advanced topic.

Some games or systems have mouse and/or keyboard support. To learn how to enable that kind of input for games in EmuVR, read Core Options.

You need to use your actual real life keyboard and mouse for this.

Mouse Input

When mouse input is enabled, if you're controlling a game, you will move the ingame mouse cursor. In desktop mode, your mouse won't move the camera when controlling games with mouse input.

When you focus input to a mouse-enabled game, EmuVR will automatically lock your cursor as if pressing the Lock Mouse key.

Keyboard Input

Retroarch has a lot of hotkeys for your keyboard, like pressing P to pause a game, F1 to show the menu, Esc to exit the game, numpad + or - to change the volume, etc. If you're trying to use your keyboard to play games or write code in your Commodore 64, for example, those hotkeys will get in the way.

That's why Retroarch has a mode called "Game Focus", where it simply will disable all hotkeys, so you can use your keyboard at will.

When enabling keyboard input mode for a system in the Game Scanner, your games will run in Retroarch with Game Focus enabled automatically from start.

That means that if you do want to use a hotkey temporarily, for example to show Retroarch's menu or to change the volume, you'll need to toggle "Game Focus" mode by pressing Scroll Lock. Press it again to disable all hotkeys back after you're done, or you might be pressing random hotkeys accidentally.

TL;DR:

  • All keyboard hotkeys are disabled in keyboard mode, so that you can type.
  • Press Scroll Lock to toggle them back if you need them.
  • Don't forget to toggle them again before you play.

Gamepad input is unaffected by this, it will always work. Some systems can receive input from both a keyboard and a gamepad at the same time.

EmuVR Window Focus

When you focus input to a mouse or keyboard enabled game, EmuVR will automatically activate and bring its window to the foreground.

If you alt-tab from EmuVR or other window/program receive focus, it will automatically unfocus you from the game. It is designed like this to prevent you from accidentally clicking or pressing keys randomly on other windows in your desktop unknowingly, in case another program steals focus for some reason and you didn't realize it because you're using an HMD.

Core Options / Device Code

You'll notice there's a "Device code" field in the Core Options window, showing a number. That number defines the ID for which virtual controller the core will see, such as a gamepad, light gun, mouse, keyboard, or even a single ID for the mouse + keyboard combo. Each core can have their own different ID numbers to define which is which.

Since EmuVR 1.0.6, Game Scanner has an internal database with those default values for each core. When you enable "Mouse" and/or "Keyboard" input, it will automatically select the default device ID for you. All the games under that folder will automatically use that input device in Retroarch, which means you don't need to mess with Retroarch's input settings to save core overrides/remaps anymore.