如何将字符键绑定到命令?像绑定之RIGHT seek +5
类的,但使用字符键,如、a
等。b
c
更新
这答案(该问题被标记为与该问题重复)正在讨论配置键绑定,例如:
LEFT seek -5
RIGHT seek +5
我已经知道了。我在这里问的是不要使用LEFT或RIGHT作为键绑定。我问的是使用H或L作为键绑定。我试过这个:
H seek -5
L seek +5
并且不起作用。我知道该mplayer -input keylist
命令没有列出任何字符键作为可用键。我在这里问的是:是否可以将字符键绑定到 Mplayer 中的命令?
答案1
快速答案是不,但是您可以编辑源代码或提出功能请求。
文档
mplayer
中是这样说的:您可以通过运行获取受支持的键名称的完整列表
mplayer -input keylist
,并通过运行获取可用命令的完整列表mplayer -input cmdlist
。在我的计算机中
mplayer -input keylist
返回此内容:SPACE SHARP ENTER TAB CTRL BS DEL INS HOME END PGUP PGDWN ESC RIGHT LEFT DOWN UP F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 KP0 KP1 KP2 KP3 KP4 KP5 KP6 KP7 KP8 KP9 KP_DEL KP_DEC KP_INS KP_ENTER MOUSE_BTN0 MOUSE_BTN1 MOUSE_BTN2 MOUSE_BTN3 MOUSE_BTN4 MOUSE_BTN5 MOUSE_BTN6 MOUSE_BTN7 MOUSE_BTN8 MOUSE_BTN9 MOUSE_BTN10 MOUSE_BTN11 MOUSE_BTN12 MOUSE_BTN13 MOUSE_BTN14 MOUSE_BTN15 MOUSE_BTN16 MOUSE_BTN17 MOUSE_BTN18 MOUSE_BTN19 MOUSE_BTN0_DBL MOUSE_BTN1_DBL MOUSE_BTN2_DBL MOUSE_BTN3_DBL MOUSE_BTN4_DBL MOUSE_BTN5_DBL MOUSE_BTN6_DBL MOUSE_BTN7_DBL MOUSE_BTN8_DBL MOUSE_BTN9_DBL MOUSE_BTN10_DBL MOUSE_BTN11_DBL MOUSE_BTN12_DBL MOUSE_BTN13_DBL MOUSE_BTN14_DBL MOUSE_BTN15_DBL MOUSE_BTN16_DBL MOUSE_BTN17_DBL MOUSE_BTN18_DBL MOUSE_BTN19_DBL JOY_UP JOY_DOWN JOY_LEFT JOY_RIGHT JOY_AXIS0_PLUS JOY_AXIS0_MINUS JOY_AXIS1_PLUS JOY_AXIS1_MINUS JOY_AXIS2_PLUS JOY_AXIS2_MINUS JOY_AXIS3_PLUS JOY_AXIS3_MINUS JOY_AXIS4_PLUS JOY_AXIS4_MINUS JOY_AXIS5_PLUS JOY_AXIS5_MINUS JOY_AXIS6_PLUS JOY_AXIS6_MINUS JOY_AXIS7_PLUS JOY_AXIS7_MINUS JOY_AXIS8_PLUS JOY_AXIS8_MINUS JOY_AXIS9_PLUS JOY_AXIS9_MINUS JOY_BTN0 JOY_BTN1 JOY_BTN2 JOY_BTN3 JOY_BTN4 JOY_BTN5 JOY_BTN6 JOY_BTN7 JOY_BTN8 JOY_BTN9 AR_PLAY AR_PLAY_HOLD AR_NEXT AR_NEXT_HOLD AR_PREV AR_PREV_HOLD AR_MENU AR_MENU_HOLD AR_VUP AR_VDOWN POWER MENU PLAY PAUSE PLAYPAUSE STOP FORWARD REWIND NEXT PREV VOLUME_UP VOLUME_DOWN MUTE XF86_PAUSE XF86_STOP XF86_PREV XF86_NEXT CLOSE_WIN
答案2
答案是可以的。将绑定放在名为的文件中~/.mplayer/input.config
。这是我为您转储的文件(带有我的个人修改):
##
## MPlayer input control file
##
## You are able to redefine default keyboard/joystick/mouse/LIRC bindings, or
## add new ones here.
## See DOCS/tech/slave.txt for possible commands that can be bound.
## Also see mplayer -input cmdlist for other possible options.
## The file should be placed in the $HOME/.mplayer directory.
##
## If you wish to unbind a key, use key ignore.
## e.g. ENTER ignore
##
RIGHT seek +2
LEFT seek -2
DOWN volume -1
UP volume +1
PGUP seek 300
PGDWN seek -300
m mute
# switch_audio # switch audio streams
+ audio_delay 0.100
= audio_delay 0.100
- audio_delay -0.100
[ speed_mult 0.9091 # scale playback speed
] speed_mult 1.1
{ speed_mult 0.5
} speed_mult 2.0
BS speed_set 1.0 # reset speed to normal
q quit
ENTER osd #pt_step 1 1 (skip to next file (too much for an edge key))
ESC pause
p pause
. frame_step # advance one frame and pause
SPACE pause
HOME pt_up_step 1
END pt_up_step -1
> pt_step 1 # skip to next file
< pt_step -1 # previous
INS alt_src_step 1
DEL alt_src_step -1
o osd
I osd_show_property_text "${filename}" # display filename in osd
P osd_show_progression
z sub_delay -0.1 # subtract 100 ms delay from subs
x sub_delay +0.1 # add
9 volume -1
/ volume -1
0 volume 1
* volume 1
1 contrast -1
2 contrast 1
3 brightness -1
4 brightness 1
5 hue -1
6 hue 1
7 saturation -1
8 saturation 1
( balance -0.1 # adjust audio balance in favor of left
) balance +0.1 # right
d frame_drop
D step_property deinterlace # toggle deinterlacer, requires -vf yadif or kerndeint
r sub_pos -1 # move subtitles up
t sub_pos +1 # down
#? sub_step +1 # immediately display next subtitle
#? sub_step -1 # previous
#? sub_scale +0.1 # increase subtitle font size
#? sub_scale -0.1 # decrease subtitle font size
f vo_fullscreen
f11 vo_fullscreen # to match my WinVice mod, both to match FireFox - F11 full screen
T vo_ontop # toggle video window ontop of other windows
w panscan -0.1 # zoom out with -panscan 0 -fs
e panscan +0.1 # in
c capturing # save (and append) file/stream to stream.dump with -capture
s screenshot # take a png screenshot with -vf screenshot
# S will take a png screenshot of every frame
h tv_step_channel 1
l tv_step_channel -1
n tv_step_norm
b tv_step_chanlist
##
## Joystick section
## WARNING: joystick support has to be explicitly enabled at
## compiletime with --enable-joystick
##
JOY_RIGHT seek 10
JOY_LEFT seek -10
JOY_UP seek 60
JOY_DOWN seek -60
JOY_BTN0 pause
JOY_BTN1 osd
JOY_BTN2 volume 1
JOY_BTN3 volume -1
JOY_BTN4 set_menu main
##
## Apple Remote section
##
## To use OSD menu with Apple Remote, set key AR_MENU to any OSD menu command,
## or just comment out the 'AR_MENU osd' line and uncomment the line after it.
##
AR_PLAY pause
AR_PLAY_HOLD quit
AR_NEXT seek 30
AR_NEXT_HOLD seek 120
AR_PREV seek -10
AR_PREV_HOLD seek -120
AR_MENU menu up
#AR_MENU menu cancel
AR_MENU_HOLD mute
AR_VUP volume 1
AR_VDOWN volume -1
##
## OSD Menu movement keys
##
## If you are using only the keyboard it is enough to define one command (like
## "menu up"), because then that single key will display the menu, which can
## then be navigated with the cursor keys and ENTER (defined in menu.conf).
##
## LIRC users should bind each "menu" command to a button on their remote.
##
## The set_menu command directly displays the (sub)menu specified as
## its argument. Usage should be self-explanatory (although not likely
## to be needed), after reading input.conf.
##
#MOUSE_BTN0 menu up
#y menu down
#y menu ok
#y menu cancel
#y menu hide
#y set_menu general_pref
##
## DVDNAV
## Requires dvdnav://
##
UP {dvdnav} dvdnav up # DVDNav UP
DOWN {dvdnav} dvdnav down # DVDNav DOWN
LEFT {dvdnav} dvdnav left # DVDNav LEFT
RIGHT {dvdnav} dvdnav right # DVDNav RIGHT
ESC {dvdnav} dvdnav menu # DVDNav MENU
ENTER {dvdnav} dvdnav select # DVDNav SELECT (ok)
BS {dvdnav} dvdnav prev # DVDNav PREVIOUS menu (in the order chapter->title->root)
AR_VUP {dvdnav} dvdnav up # DVDNav UP
AR_VDOWN {dvdnav} dvdnav down # DVDNav DOWN
AR_PREV {dvdnav} dvdnav left # DVDNav LEFT
AR_NEXT {dvdnav} dvdnav right # DVDNav RIGHT
AR_MENU {dvdnav} dvdnav menu # DVDNav MENU
AR_PLAY {dvdnav} dvdnav select # DVDNav SELECT (ok)
#? seek_chapter -1 # skip to previous dvd chapter
#? seek_chapter +1 # next
##
## Advanced seek
## Uncomment the following lines to be able to seek to n% of the media with
## the Fx keys.
##
#F1 seek 10 1
#F2 seek 20 1
#F3 seek 30 1
#F4 seek 40 1
#F5 seek 50 1
#F6 seek 60 1
#F7 seek 70 1
#F8 seek 80 1
#F9 seek 90 1