It should already have these defaults:
Arrow keys = D-pad
ZXASQW = BAYXLR
RShift = Select
Enter = Start
You can add additional binds in /opt/retropie/configs/all/retroarch.cfg:
input_player1_b = "z"
input_player1_a = "x"
input_player1_y = "a"
input_player1_x = "s"
input_player1_start = "enter"
input_player1_select = "rshift"
input_player1_l = "q"
input_player1_r = "w"
input_player1_left = "left"
input_player1_right = "right"
input_player1_up = "up"
input_player1_down = "down"
# input_player1_l2 =
# input_player1_r2 =
# input_player1_l3 =
# input_player1_r3 =
# input_player1_l_x_plus =
# input_player1_l_x_minus =
# input_player1_l_y_plus =
# input_player1_l_y_minus =
# input_player1_r_x_plus =
# input_player1_r_x_minus =
# input_player1_r_y_plus =
# input_player1_r_y_minus =
This works in conjunction with the gamepad. Right now I am playing Double Dragon (arcade, ddragonw.zip under lr-fbneo) using the d-pad to walk around and the keyboard to punch and kick.