Mercurial > mplayer.hg
changeset 4530:22a4c7957f03
Add playlist keys (some missing?!) and add some shift handlers to allow keys to work with german keyboards.
author | atmos4 |
---|---|
date | Mon, 04 Feb 2002 19:14:40 +0000 |
parents | 8f982d17c479 |
children | 1736cd920aa4 |
files | libvo/vo_sdl.c |
diffstat | 1 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_sdl.c Mon Feb 04 18:53:01 2002 +0000 +++ b/libvo/vo_sdl.c Mon Feb 04 19:14:40 2002 +0000 @@ -327,9 +327,9 @@ { struct sdl_priv_s *priv = &sdl_priv; const SDL_VideoInfo *vidInfo = NULL; - static int opened = 0; + /*static int opened = 0; - /*if (opened) + if (opened) return 0; opened = 1;*/ @@ -1018,7 +1018,8 @@ #include "../linux/keycodes.h" extern void mplayer_put_key(int code); - + +#define shift_key (event.key.keysym.mod==(KMOD_LSHIFT||KMOD_RSHIFT)) static void check_events (void) { struct sdl_priv_s *priv = &sdl_priv; @@ -1051,6 +1052,8 @@ case SDLK_DOWN: mplayer_put_key(KEY_DOWN); break; case SDLK_LEFT: mplayer_put_key(KEY_LEFT); break; case SDLK_RIGHT: mplayer_put_key(KEY_RIGHT); break; + case SDLK_LESS: mplayer_put_key(shift_key?'>':'<'); break; + case SDLK_GREATER: mplayer_put_key('>'); break; case SDLK_ASTERISK: case SDLK_KP_MULTIPLY: case SDLK_w: mplayer_put_key('*'); break; @@ -1120,7 +1123,8 @@ /*case SDLK_o: mplayer_put_key('o');break; case SDLK_SPACE: mplayer_put_key(' ');break; case SDLK_p: mplayer_put_key('p');break;*/ - case SDLK_PLUS: + case SDLK_7: mplayer_put_key(shift_key?'/':'7'); + case SDLK_PLUS: mplayer_put_key(shift_key?'*':'+'); case SDLK_KP_PLUS: mplayer_put_key('+');break; case SDLK_MINUS: case SDLK_KP_MINUS: mplayer_put_key('-');break; @@ -1144,6 +1148,8 @@ case SDLK_DOWN: mplayer_put_key(KEY_DOWN);break; case SDLK_LEFT: mplayer_put_key(KEY_LEFT);break; case SDLK_RIGHT: mplayer_put_key(KEY_RIGHT);break; + case SDLK_LESS: mplayer_put_key(shift_key?'>':'<'); break; + case SDLK_GREATER: mplayer_put_key('>'); break; case SDLK_ASTERISK: case SDLK_KP_MULTIPLY: case SDLK_w: mplayer_put_key('*');break; @@ -1152,6 +1158,7 @@ case SDLK_s: mplayer_put_key('/');break; #endif default: + //printf("got scancode: %d keysym: %d mod: %d %d\n", event.key.keysym.scancode, keypressed, event.key.keysym.mod); mplayer_put_key(keypressed); } @@ -1163,6 +1170,7 @@ } } } +#undef shift_key static void draw_osd(void) { struct sdl_priv_s *priv = &sdl_priv;