You asked:

is a keyboard a input device or an output device

  • computer input device
    computer input device
    computer input device.