slider: fix the key handling

Signed-off-by: haitao52198 <413162621@qq.com>