The 6 buttons on the EV3 are connected to GPIOs.

Button GPIO Description
0 7-5 Up
1 1-13 Enter
2 7-14 Down
3 7-12 Right
4 6-6 Left
5 6-10 Backspace

Device Driver

We are using the existing gpio-keys driver. This causes the buttons to function as regular keyboard keys. Key mapping is defined in board-legoev3.c.