e72a935acf2d0edd9320b2b525b5839243985db2
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / io / Connexion3D.java
1 /*
2  * Sixth 3D engine. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of version 3 of the GNU Lesser General Public License
6  * or later as published by the Free Software Foundation.
7  *
8  */
9
10 package eu.svjatoslav.sixth.e3d.io;
11
12 import java.io.BufferedReader;
13 import java.io.FileReader;
14 import java.io.IOException;
15
16 /**
17  * 3D Connexion mouse adapter.
18  * <p>
19  * Idea is to read Linux device file and interpret resulting numbers.
20  * <p>
21  * TODO: unfinished
22  */
23
24 public class Connexion3D {
25
26     public static void main(final String[] args) throws IOException {
27
28         final BufferedReader in = new BufferedReader(new FileReader(
29                 "/dev/hidraw4"));
30
31
32         while (true) {
33             System.out.print(in.read() + " ");
34             System.out.println("\n");
35         }
36
37         // in.close();
38
39     }
40 }