- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
function TmainForm1.getLetterFinger( letter: String ): Integer;
begin
letter := UpperCase( letter );
if ( letter = 'Ё' ) or ( letter = '1' ) or ( letter = 'Й' ) or
( letter = 'Ф' ) or ( letter = 'Я' ) or ( letter = '~' ) or
( letter = '!' ) or ( letter = 'Q' ) or ( letter = 'A' ) or
( letter = 'Z' ) or ( letter = 'LSHIFT' ) or ( letter = 'LCTRL' ) or
( letter = 'TAB' ) or ( letter = 'CAPS' ) or ( letter = 'SHIFT' ) then
Result := 1;
if ( letter = '2' ) or ( letter = '@' ) or ( letter = '"' ) or
( letter = 'W' ) or ( letter = 'S' ) or ( letter = 'X' ) or
( letter = 'Ц' ) or ( letter = 'Ы' ) or ( letter = 'Ч' ) then
Result := 2;
if ( letter = '3' ) or ( letter = '№' ) or ( letter = '#' ) or
( letter = 'E' ) or ( letter = 'D' ) or ( letter = 'C' ) or
( letter = 'У' ) or ( letter = 'В' ) or ( letter = 'С' ) then
Result := 3;
if ( letter = '4' ) or ( letter = ';' ) or ( letter = '$' ) or
( letter = 'R' ) or ( letter = 'F' ) or ( letter = 'V' ) or
( letter = 'К' ) or ( letter = 'А' ) or ( letter = 'М' ) or
( letter = '5' ) or ( letter = '%' ) or ( letter = 'Е' ) or
( letter = 'П' ) or ( letter = 'И' ) or ( letter = 'Е' ) or
( letter = 'T' ) or ( letter = 'G' ) or ( letter = 'B' ) then
Result := 4;
if ( letter = 'LSPACE' ) or ( letter = 'LATL' ) then
Result := 5;
if ( letter = 'RSPACE' ) or ( letter = 'RATL' ) then
Result := 6;
if ( letter = '&' ) or ( letter = '?' ) or ( letter = '7' ) or
( letter = 'Y' ) or ( letter = 'U' ) or ( letter = 'H' ) or
( letter = 'J' ) or ( letter = 'N' ) or ( letter = 'M' ) or
( letter = 'Н' ) or ( letter = 'Г' ) or ( letter = 'Р' ) or
( letter = 'О' ) or ( letter = 'Т' ) or ( letter = 'Ь' ) then
Result := 7;
if ( letter = '8' ) or ( letter = '*' ) or ( letter = 'Ш' ) or
( letter = 'Л' ) or ( letter = 'Б' ) or ( letter = ',' ) or
( letter = '<' ) or ( letter = 'K' ) or ( letter = 'I' ) then
Result := 8;
if ( letter = '9' ) or ( letter = '(' ) or ( letter = 'O' ) or
( letter = 'L' ) or ( letter = '.' ) or ( letter = '>' ) or
( letter = 'Щ' ) or ( letter = 'Д' ) or ( letter = 'Ю' ) then
Result := 9;
if ( letter = '0' ) or ( letter = ')' ) or ( letter = '-' ) or
( letter = '_' ) or ( letter = '+' ) or ( letter = '=' ) or
( letter = 'BACKSPACE' ) or ( letter = 'ENTER' ) or
( letter = 'RSHIFT' ) or ( letter = 'P' ) or ( letter = '{' ) or
( letter = '[' ) or ( letter = '}' ) or ( letter = ']' ) or
( letter = ':' ) or ( letter = ';' ) or ( letter = '''' ) or
( letter = '"' ) or ( letter = '/' ) or ( letter = '?' ) or
( letter = '\' ) or ( letter = '/' ) or ( letter = '?' ) or
( letter = '|' ) or ( letter = 'Ж' ) or ( letter = 'Э' ) or
( letter = '.' ) or ( letter = ',' ) or ( letter = 'З' ) or
( letter = 'Х' ) or ( letter = 'Ъ' ) then
Result := 10;
end;
Fai 30.07.2011 19:09 # +1
inkanus-gray 30.07.2011 19:13 # 0
SmackMyBitchUp 30.07.2011 19:18 # +3
Fai 30.07.2011 21:46 # +2
inkanus-gray 30.07.2011 22:49 # 0
Первую часть можно сделать даже без множеств, объявив массив-константу или строку с результатами.
Fai 31.07.2011 04:26 # 0
guest 31.07.2011 08:32 # −1
bugmenot 31.07.2011 00:13 # +2
'ааа', 'бээ', 'вээ', 'гээ'
так и хочется на ALTGR+LSHIFT+RETURN послать
bugmenot 30.07.2011 19:29 # +3
спасибо за понимание
> LetterFinger
сапог-полено.txt
lucidfox 31.07.2011 13:47 # +2
bugmenot 31.07.2011 14:57 # 0
кстати, не православная GetLetterFinger, а верблюдофильская getLetterFinger
guest 31.07.2011 17:16 # 0
Когда идентификаторов в программе очень много - это веский довод.
kipar 01.08.2011 14:32 # 0
guest 01.08.2011 23:49 # +1
Fai 02.08.2011 15:40 # 0
guest 02.08.2011 22:15 # 0
Fai 03.08.2011 19:11 # −2
guest 03.08.2011 22:19 # 0
Fai 03.08.2011 22:31 # −2