Comments (10)
the input system does need an update for the the analogue joystick and joystick buttons. The controls are moot at the moment for joysticks. I didnt notice that particular problems with the keyboard but ill look into it please see here for the joystick fixes. I done for daphne
from hypseus.
Forgot to mention,
If these keys are attempted to be assigned, Then the switch ends up with no assignment at all.
from hypseus.
The keys should assign but for them to work you need to override the defaults. If you want to use the arrow keys set up down left and right to something else. Defaults are as follows
int g_key_defs[SWITCH_COUNT][2] = {
{SDLK_UP, SDLK_KP_8}, // up
{SDLK_LEFT, SDLK_KP_4}, // left
{SDLK_DOWN, SDLK_KP_2}, // down
{SDLK_RIGHT, SDLK_KP_6}, // right
{SDLK_1, 0}, // 1 player start
{SDLK_2, 0}, // 2 player start
{SDLK_SPACE, SDLK_LCTRL}, // action button 1
{SDLK_LALT, 0}, // action button 2
{SDLK_LSHIFT, 0}, // action button 3
{SDLK_5, SDLK_c}, // coin chute left
{SDLK_6, 0}, // coin chute right
{SDLK_KP_DIVIDE, 0}, // skill easy
{SDLK_KP_MULTIPLY, 0}, // skill medium
{SDLK_KP_MINUS, 0}, // skill hard
{SDLK_9, 0}, // service coin
{SDLK_F2, 0}, // test mode
{SDLK_F3, 0}, // reset cpu
{SDLK_F12, SDLK_F11}, // take screenshot
{SDLK_ESCAPE, SDLK_q}, // Quit DAPHNE
{SDLK_p, 0}, // pause game
{SDLK_BACKQUOTE, 0}, // toggle console (TODO)
{SDLK_t, 0}, // Tilt/Slam switch
};
from hypseus.
No, They don't assign. It's specifically those keys listed (CTRL, ALT, SHIFT, ARROWS)
The other keys assign fine.
Try this simple example test and you will see pause SHOULD be assigned to up arrow.
Even though you can assign a key to multiple switches - In this example we explicitly redefine
"KEY_UP" to the "i" key to ensure there are no conflicts. Running shows pause is not bound to "Up arrow".
[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 273 0 0
END
from hypseus.
ill look into that the joystick had problems with buttons doing that. Ill look at the code when i get off work should be easy enough to fix.
nt g_key_defs[SWITCH_COUNT][2] = {
{SDLK_UP, SDLK_KP_8}, // up
{SDLK_LEFT, SDLK_KP_4}, // left
{SDLK_DOWN, SDLK_KP_2}, // down
{SDLK_RIGHT, SDLK_KP_6}, // right
{SDLK_1, 0}, // 1 player start
{SDLK_2, 0}, // 2 player start
{SDLK_SPACE, SDLK_LCTRL}, // action button 1
{SDLK_LALT, 0}, // action button 2
{SDLK_LSHIFT, 0}, // action button 3
{SDLK_5, SDLK_c}, // coin chute left
{SDLK_6, 0}, // coin chute right
{SDLK_KP_DIVIDE, 0}, // skill easy
{SDLK_KP_MULTIPLY, 0}, // skill medium
{SDLK_KP_MINUS, 0}, // skill hard
{SDLK_9, 0}, // service coin
{SDLK_F2, 0}, // test mode
{SDLK_F3, 0}, // reset cpu
{SDLK_F12, SDLK_F11}, // take screenshot
{SDLK_ESCAPE, SDLK_q}, // Quit DAPHNE
{SDLK_p, 0}, // pause game
{SDLK_BACKQUOTE, 0}, // toggle console (TODO)
{SDLK_t, 0}, // Tilt/Slam switch
};
from hypseus.
try this
[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 82 0 0
END
https://gist.github.com/stuartpb/804078/eb8df5f6dbfd063401b5a67a6a2509ed64db5b66
if this doesnt work ill check whats going on in the keyboard code in sdl2
from hypseus.
ASCII Code 82 aka Capital "R" Does not work (Same as SHIFT, CTRL, ALT, ARROWS).
I'd take a guess that all the Capitals don't work.
from hypseus.
try up with code 82 for up forget ascii for now.
see
https://github.com/davidsiaw/SDL2/blob/master/include/SDL_keycode.h
looks like its just expanding a macro for keys other than standards ascii. ill look into thsi properly when i get the time wont be too hard to fix
from hypseus.
Ok, got it.
https://wiki.libsdl.org/SDLKeycodeLookup
[KEYBOARD]
KEY_UP = 105 0 0
KEY_PAUSE = 1073741906 0 0
END
Up arrow now initiates pause.
So we need a new keycode list
aka https://wiki.libsdl.org/SDLKeycodeLookup
from hypseus.
well i knew the macro was doing something :) another mystery solved welcome to the sdl2 update
from hypseus.
Related Issues (20)
- Black screen on Raspberry Pi HOT 24
- Compilation error with buildroot HOT 1
- debian 9 strech HOT 15
- "Sound" folder is missing HOT 1
- Fullscreen mode looses focus HOT 1
- Tilt key reports Error/Bug in log HOT 1
- Scoreboard overlay incorrect position and missing text HOT 4
- Two windows are created
- No video HOT 1
- No error or info is printed when incorrect/no options are passed.
- Playback errors and stalling HOT 1
- Video index rebuild fails to complete
- hotkeys or settings for sound level HOT 1
- USB scoreboard addition breaks compilation HOT 1
- Build failure on Raspberry Pi HOT 10
- Further discussion about threading and overlays HOT 4
- New Fork, new overlays - Hypseus Singe - Kinda went off on my own....
- Compile Pi4 Fails HOT 3
- Segmentation fault - Linux 32 bit HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hypseus.