summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-04 19:14:40 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-04 19:14:40 +0000
commitc72d8db0777ec7cc0773cdb2e0cad4e345863615 (patch)
tree16c5c8e719f55447becd587ce50f7e00eef3d62c
parent12176a29c0131a8d222cf4790e31ccebcd732dd2 (diff)
downloadmpv-c72d8db0777ec7cc0773cdb2e0cad4e345863615.tar.bz2
mpv-c72d8db0777ec7cc0773cdb2e0cad4e345863615.tar.xz
Add playlist keys (some missing?!) and add some shift handlers to allow keys to work with german keyboards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4531 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_sdl.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index a9e99b1c0b..7b36ef6a8b 100644
--- a/libvo/vo_sdl.c
+++ b/libvo/vo_sdl.c
@@ -327,9 +327,9 @@ static int sdl_open (void *plugin, void *name)
{
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 @@ static uint32_t draw_slice(uint8_t *image[], int stride[], int w,int h,int x,int
#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 @@ static void check_events (void)
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 @@ static void check_events (void)
/*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 @@ static void check_events (void)
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 @@ static void check_events (void)
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 @@ static void check_events (void)
}
}
}
+#undef shift_key
static void draw_osd(void)
{ struct sdl_priv_s *priv = &sdl_priv;