summarylogtreecommitdiffstats
path: root/shiftpressed.c
blob: 71358ab8b9f9de12e67160ba83c53e9f341f21dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <stdlib.h>

#include <sys/ioctl.h>

int main()
{
  char shift_state;

  shift_state = 6;
  if (ioctl(0, TIOCLINUX, &shift_state) < 0) {
    perror("ioctl TIOCLINUX 6 (get shift state)");
    exit(1);
  }
  printf("%x\n", shift_state);
  return 0;
}