You asked:

is a keyboard a input device or an output device

  • computer input device.