.\" This manpage is Copyright (C) 1996 Michael Haardt. .\" Updates Nov 1998, Andries Brouwer .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1996,1997,1998 .\" ISHIKAWA Mutsumi,TAKAHASHI Mutsuji .\" all rights reserved. .\" Translated Tue Feb 14 00:47:44 JST 1997 .\" by ISHIKAWA Mutsumi .\" and TAKAHASHI Mutsuji .\" .TH MOUSE 4 " 2020\-08\-13" Linux "Linux Programmer's Manual" .SH 名前 mouse \- シリアルマウスインターフェース .SH 設定 シリアルマウスは RS232/V24 ダイアルアウトラインに接続される。 RS232/V24 ダイアルアウトライン については \fBttyS\fP(4) を参照のこと。 .SH 説明 .SS 概説 シリアルマウスで使われる普通の 9 ピンプラグのピン配列は以下である: .PP .TS center; r c l. pin name used for 2 RX Data 3 TX \-12 V, Imax = 10 mA 4 DTR +12 V, Imax = 10 mA 7 RTS +12 V, Imax = 10 mA 5 GND Ground .TE .PP これは仕様書であり、実際はほとんどのマウスでは 9 V で十分である。 .PP マウスドライバは RTS をロー(low)に落し、再び上げることによって、マウスを認識でき る。およそ 14 ms 後、マウスはデータライン上に 0x4D (\(aqM\(aq) を送るだろう。さら に 63ms あと、マイクロソフト互換 3ボタンマウスは 0x33 (\(aq3\(aq) を送る。 .PP マウスの相対的な移動は、\fIdx\fP(正が右)と\fIdy\fP(正が下)として伝えられる。 各種のマウスは異なったスピードで操作できる。スピードを選択するには、 下の表の2文字を送ってから 0.1 秒待つことで、9600, 4800, 2400, 1200 bit/s を順に選べる。 以下の表では選択可能なスピードとそれを選択するための文字列を示している。 .PP .TS center; l l. bit/s string 9600 *q 4800 *p 2400 *o 1200 *n .TE .PP データパケットの第 1 バイトは同期をとるのに利用できる。 .SS "マイクロソフト プロトコル(Microsoft Protocol)" \fBマイクロソフト\fPプロトコルは、1200 bits/sec のスピードで、1 ス タートビット(1 start bit)、7 データビット(7 data bits)、パリティな し、1 ストップビット(1 stop bit)である。 データは RxD に 3 バイトのパケットとして送られる。\fIdx\fP と \fIdy\fP の動きは 2 の補数表示で送られ、左(右)のボタンが押された時には \fIlb\fP (\fIrb\fP)がセットされる。 .PP .TS center; r c c c c c c c. byte d6 d5 d4 d3 d2 d1 d0 1 1 lb rb dy7 dy6 dx7 dx6 2 0 dx5 dx4 dx3 dx2 dx1 dx0 3 0 dy5 dy4 dy3 dy2 dy1 dy0 .TE .SS "3つボタン マイクロソフト プロトコル(3\-button Microsoft protocol)" 本来のマイクロソフトマウスは 2 つのボタンしか持たない。しかし、3 つボタン のマウスでマイクロソフトプロトコルの物も存在する。真中のボタンを押す、 または放すということは、動きゼロでボタンが押されていないというパケット を送ることで伝えられる。(従って他の二つのボタンと違い、真中のボタ ンのステータスは、それぞれのパケットからは伝わって来ない。) .SS "ロジテック プロトコル(Logitech protocol)" ロジテック シリアル 3つボタンマウスは、マイクロソフト プロトコルとは 異なった拡張をしている。:真中のボタンが押されてないと、上記 3バイトの パケットが送られる。真中のボタンが押されていると、4バイトのパケットが 送られる。第4バイトは 0x20 の値を持っている(あるいは、少なくとも 0x20 ビットがセットされている)。 但し、他のボタンが押されていない状態で、 真中のボタンが押されると、0,0,0,0x20 と伝えられる。 .SS "マウスシステムズ プロトコル(Mousesystems protocol)" \fBマウスシステムズ\fPプロトコルは、1200 bits/secで、1 スタートビット、 8 データビット、パリティなし、2 ストップビットである。 データは、RxD に 5 バイトのパケットとして送られる。\fIdx\fP は 2 つの 2 の補数の和として送られ、\fIdy\fP は 2 つの 2 の補数の和の否定 として送られる。左(中、右)のボタンが押された時には\fIlb\fP (\fImb\fP, \fIrb\fP) がクリアされる。 .PP .TS center; r c c c c c c c c. byte d7 d6 d5 d4 d3 d2 d1 d0 1 1 0 0 0 0 lb mb rb 2 0 dxa6 dxa5 dxa4 dxa3 dxa2 dxa1 dxa0 3 0 dya6 dya5 dya4 dya3 dya2 dya1 dya0 4 0 dxb6 dxb5 dxb4 dxb3 dxb2 dxb1 dxb0 5 0 dyb6 dyb5 dyb4 dyb3 dyb2 dyb1 dyb0 .TE .PP 第 4,5 バイトには、第 2,3 バイトが送られたあと生じた変更が記述される。 .SS "サン プロトコル(Sun protocol)" \fBサン\fP プロトコルは、上記の 5 バイト マウスシステムプロトコルの 3 バイト版です。後の 2 バイトは送られません。 .SS "MM プロトコル(MM protocol)" \fBMM\fP プロトコルは 1200 bits/sec で 1 スタートビット、8 データビッ ト、奇数パリティ、 1 ストップビットを使う。データは RxD に 3 バイトのパ ケットとして送られる。\fIdx\fP と \fIdy\fP は一つの符号つきの値として 送られ、サインビットは負の値を表す。左(中、右)のボタンが押された時には \fIlb\fP (\fImb\fP, \fIrb\fP)がセットされる。 .PP .TS center; r c c c c c c c c. byte d7 d6 d5 d4 d3 d2 d1 d0 1 1 0 0 dxs dys lb mb rb 2 0 dx6 dx5 dx4 dx3 dx2 dx1 dx0 3 0 dy6 dy5 dy4 dy3 dy2 dy1 dy0 .TE .SH ファイル .TP \fI/dev/mouse\fP 一般的にマウスデバイスをさすのに使われるシンボリックリンク .SH 関連項目 \fBttyS\fP(4), \fBgpm\fP(8) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。