Questions tagged [gamepad]

A type of game controller held in two hands

A gamepad (also called joypad or control pad), is a type of game controller held in two hands, where the fingers (especially thumbs) are used to provide input. Gamepads generally feature a set of action buttons handled with the right thumb and a direction controller handled with the left. The direction controller has traditionally been a four-way digital cross (also named a joypad, or alternatively a D-pad), but most modern controllers additionally (or as a substitute) feature an analog stick.

303 questions
4
votes
0 answers

android gamepad background service

My friends and I are trying to use android gamepad key presses to trigger phone calls. We want this to work even if the device is asleep. What would be the appropriate manner to approach this? I have found android.view.InputDevice and KeyEvent…
mlihp
  • 485
  • 4
  • 12
4
votes
0 answers

How can I simulate/emulate a gamepad in xCode?

Background: I have a Bluetooth gamepad which I can discover and connect to through xCode. I can communicate with it through the Control and Interrupt channel and thus I can find out which buttons on the Gamepad are being pressed. I can then map this…
Mark
  • 16,906
  • 20
  • 84
  • 117
3
votes
0 answers

Check Controller Connection with SDL2?

So I want to check if a controller is still connected after properly initialization with this joystick_ = SDL_JoystickOpen(0); if (!joystick_) { std::cerr << "Failed to open joystick: " << SDL_GetError() << std::endl; …
Cadybrille
  • 31
  • 2
3
votes
2 answers

SwiftUI - How to perform action only while the button is tapped, and end it when the tap is released?

I'm trying to recreate a Game Boy like game pad in SwiftUI. Graphically it looks good, but I can't make the actions work. I would like it to perform the action (move in the selected direction) while the arrow is tapped, and to stop moving once the…
Pandruz
  • 345
  • 5
  • 18
3
votes
1 answer

is it possible to use a joystick/game controller input in cmd?

As the title says, I would like to use Joystick buttons for input in this simple batch I am writing. Is it even possible? I know I can use a Joy to Keyboard mapper program to emulate keystrokes, but I would like to avoid this extra layer if…
3
votes
0 answers

Is there a way to use the HTML5 Gamepad API with multiple windows or tabs in Firefox?

I'm designing an app that utilizes input from a gamepad using the HTML5 Gamepad API. I have the app working in both Firefox and Chrome, however Firefox does not seem to allow a second Window or Tab to access the gamepad after a previous tab has…
DWCP
  • 136
  • 1
  • 4
3
votes
0 answers

Pygame: Analog trigger initial value is not the neutral trigger position

I'm developing an application that uses pygame to read analog trigger values from an XBox 360-Style gamepad. This application relies on the triggers being initialized to the neutral position, or else it results in undefined behaviour. The problem:…
Prunebutt
  • 31
  • 2
3
votes
1 answer

How to prevent fingerprint scanner from being chosen as a gamepad?

My game uses the InputManager to iterate through all device IDs, choosing ones that have Joystick and Gamepad flags set. The problem is that some devices (the LG V35 ThinQ for example) are registering their Fingerprint Scanners as…
cjserio
  • 2,857
  • 7
  • 29
  • 29
3
votes
1 answer

Using joystick module from PyGame

Exact code with commenting can be found here, or here. while done==False: for event in pygame.event.get(): if event.type == pygame.QUIT: done=True if event.type == pygame.JOYBUTTONDOWN: print("Joystick button pressed.") …
user10332166
3
votes
2 answers

Pragmatic approach to interface navigation on gamepad?

I've built a web game using html/react. It's on the canvas, however the interface is just DOM elements. Users can already play the game with a controller but I would like to design a way to also navigate the interface. I was thinking of perhaps just…
Womble
  • 345
  • 3
  • 13
3
votes
1 answer

Is it possible to register a custom gamepad in javascript with the Gamepad API?

Quick background I am currently working on a VR application with A-frame to showcase VR hardware. We use custom controllers that connects through websocket/bluetooth and would like to make them compatible with the tracked-controls. Those A-Frame…
WilBros
  • 31
  • 1
3
votes
1 answer

Filter real input devices

I'm trying to get list of connected gamepads following way: InputDevice.getDeviceIds() .map { InputDevice.getDevice(it) } .filter { it.sources and InputDeviceCompat.SOURCE_GAMEPAD == InputDeviceCompat.SOURCE_GAMEPAD } …
OleGG
  • 8,589
  • 1
  • 28
  • 34
3
votes
0 answers

emulating a gamepad on Gear VR?

I've received my Gear VR last week and found out that most of the better app in Oculus Home require a gamepad. So I've had this crazy idea of trying to use one of my four xbox 360 controllers, that are connect to my PC, to send commands to the Gear…
3
votes
1 answer

Why won't SDL detect my iBuffalo game controller on Linux (PocketCHIP)?

I recently obtained an ARM-based Linux computer called a PocketCHIP. It's a great little computer! I'm working on writing a program which uses SDL 2.0.4 and my iBuffalo USB gamepad. However, SDL does not seem to recognize the controller on the…
Andrew
  • 227,796
  • 193
  • 515
  • 708
3
votes
1 answer

Multiple game controllers on Android

According to this website https://developer.android.com/training/game-controllers/multiple-controllers.html , Android seems to support multiple gamepads. Actually, it doesn't work when multiple input device event is occurred simultaneously. for…
devMiyax
  • 65
  • 1
  • 8
1
2
3
20 21