The mouse is normally accessible under Linux as a device under
/dev/input and there is a virtual device
/dev/input/mice that allows you to receive input from all mice in the system through a single device.
This mouse device is not normally connected to the standard input of any process though. If you are using a graphical environment then the X11 server is the process that opens one or more of these devices and receives mouse events. Normal applications receive mouse events using the X11 protocol (or whatever higher-level toolkit they are using) along with all other types of events (keyboard events, window drawing events, window focus events, etc...), not through stdin.
Touchscreens, like mice, also present as devices in
/dev/input. The first touchscreen device in the system is called
All of the devices in
/dev/input, including touchscreens and mice, deliver events in a specific binary format defined in the C include file