|
tetchanさん、こんにちは。
K'zawaです。
この程度でよければどうぞ。
6個同時押しに対応さえしていれば動くと思います。
点字キー以外の機能
ESC = マクロ終了
Tab = タブ記号入力
Enter = エンター
; = エンター
@ = バックスペース
Space = 空白入力
// マクロここから
setcompatiblemode 0x0F;
while ( 1 ) {
#n = inputchar( "macro is running" );
if ( #n == 9 ) insert "\t";
else if ( #n == 13 ) insertreturn;
else if ( #n == 27 ) break;
else if ( #n == 28 ) left;
else if ( #n == 29 ) up;
else if ( #n == 30 ) right;
else if ( #n == 31 ) down;
else if ( #n == 32 ) insert " ";
else {
call Keys;
call Char ##return;
insert $$return;
}
}
endmacro;
Keys:
while ( iskeydown(70) | iskeydown(68) | iskeydown(83)
| iskeydown(74) | iskeydown(75) | iskeydown(76) ) {
if ( iskeydown(70) ) ##k = ##k | 0x01;
if ( iskeydown(68) ) ##k = ##k | 0x02;
if ( iskeydown(83) ) ##k = ##k | 0x04;
if ( iskeydown(74) ) ##k = ##k | 0x08;
if ( iskeydown(75) ) ##k = ##k | 0x10;
if ( iskeydown(76) ) ##k = ##k | 0x20;
}
return ##k;
Char:
if ( ##1 == 1 ) $$c = "A";
else if ( ##1 == 2 ) $$c = "1";
else if ( ##1 == 3 ) $$c = "B";
else if ( ##1 == 4 ) $$c = "'";
else if ( ##1 == 5 ) $$c = "K";
else if ( ##1 == 6 ) $$c = "2";
else if ( ##1 == 7 ) $$c = "L";
else if ( ##1 == 8 ) $$c = "@";
else if ( ##1 == 9 ) $$c = "C";
else if ( ##1 == 10 ) $$c = "I";
else if ( ##1 == 11 ) $$c = "F";
else if ( ##1 == 12 ) $$c = "/";
else if ( ##1 == 13 ) $$c = "M";
else if ( ##1 == 14 ) $$c = "S";
else if ( ##1 == 15 ) $$c = "P";
else if ( ##1 == 16 ) $$c = "\"";
else if ( ##1 == 17 ) $$c = "E";
else if ( ##1 == 18 ) $$c = "3";
else if ( ##1 == 19 ) $$c = "H";
else if ( ##1 == 20 ) $$c = "9";
else if ( ##1 == 21 ) $$c = "O";
else if ( ##1 == 22 ) $$c = "6";
else if ( ##1 == 23 ) $$c = "R";
else if ( ##1 == 24 ) $$c = "^";
else if ( ##1 == 25 ) $$c = "D";
else if ( ##1 == 26 ) $$c = "J";
else if ( ##1 == 27 ) $$c = "G";
else if ( ##1 == 28 ) $$c = ">";
else if ( ##1 == 29 ) $$c = "N";
else if ( ##1 == 30 ) $$c = "T";
else if ( ##1 == 31 ) $$c = "Q";
else if ( ##1 == 32 ) $$c = ",";
else if ( ##1 == 33 ) $$c = "*";
else if ( ##1 == 34 ) $$c = "5";
else if ( ##1 == 35 ) $$c = "<";
else if ( ##1 == 36 ) $$c = "−";
else if ( ##1 == 37 ) $$c = "U";
else if ( ##1 == 38 ) $$c = "8";
else if ( ##1 == 39 ) $$c = "V";
else if ( ##1 == 40 ) $$c = ".";
else if ( ##1 == 41 ) $$c = "%";
else if ( ##1 == 42 ) $$c = "[";
else if ( ##1 == 43 ) $$c = "$";
else if ( ##1 == 44 ) $$c = "+";
else if ( ##1 == 45 ) $$c = "X";
else if ( ##1 == 46 ) $$c = "!";
else if ( ##1 == 47 ) $$c = "&";
else if ( ##1 == 48 ) $$c = ";";
else if ( ##1 == 49 ) $$c = ":";
else if ( ##1 == 50 ) $$c = "4";
else if ( ##1 == 51 ) $$c = "\\";
else if ( ##1 == 52 ) $$c = "0";
else if ( ##1 == 53 ) $$c = "Z";
else if ( ##1 == 54 ) $$c = "7";
else if ( ##1 == 55 ) $$c = "(";
else if ( ##1 == 56 ) $$c = "_";
else if ( ##1 == 57 ) $$c = "?";
else if ( ##1 == 58 ) $$c = "W";
else if ( ##1 == 59 ) $$c = "]";
else if ( ##1 == 60 ) $$c = "#";
else if ( ##1 == 61 ) $$c = "Y";
else if ( ##1 == 62 ) $$c = ")";
else if ( ##1 == 63 ) $$c = "=";
else beep;
return $$c;
|
|