Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5705 → Rev 5706

/programs/cmm/Calypte/Calypte.c
112,8 → 112,6
void main()
{
int id;
word key_ascii, key_scancode;
dword status_key;
strcpy(#filter2.ext1, "TXT");
//strcpy(#filter2.ext2, "ASM");
185,13 → 183,9
case evKey:
if (Form.status_window>2) break;
GetFullKey();
key_ascii = AH;
$shr eax,16
key_scancode = AL;
status_key = GetStatusKey();
GetKeys();
if (tview.ProcessKey(key_scancode)) DrawText();
if (TestBit(status_key, 2))
if (TestBit(key_modifier, 2))
{
switch(key_scancode)
{
/programs/cmm/appearance/appearance.c
146,8 → 146,6
void main()
{
int id, mouse_clicked;
word key_ascii, key_scancode;
dword status_key;
 
SetEventMask(0x27);
load_dll(boxlib, #box_lib_init,0);
195,11 → 193,7
break;
case evKey:
GetFullKey();
key_ascii = AH;
$shr eax,16
key_scancode = AL;
status_key = GetStatusKey();
GetKeys();
if (list[SKINS].active) && (list[SKINS].ProcessKey(key_scancode)) Apply();
if (list[WALLPAPERS].active) && (list[WALLPAPERS].ProcessKey(key_scancode)) Apply();
IF (key_scancode==SCAN_CODE_ENTER) OpenFile();
/programs/cmm/eolite/Eolite.c
105,8 → 105,7
 
void main()
{
word key, key2, id;
dword status_key;
word id;
char can_show, can_select, stats;
dword selected_offset;
dword IPC_LEN,IPC_ID;
330,44 → 329,40
break;
//Key pressed-----------------------------------------------------------------------------
case evKey:
GetFullKey();
key = AH;
$shr eax,16
key2 = AL;
status_key = GetStatusKey();
GetKeys();
 
if (Form.status_window>2) break;
if (del_active)
{
if (key2 == SCAN_CODE_ENTER) Del_File(true);
if (key2 == SCAN_CODE_ESC) Del_File(false);
if (key_scancode == SCAN_CODE_ENTER) Del_File(true);
if (key_scancode == SCAN_CODE_ESC) Del_File(false);
break;
}
if (new_element_active)
{
if (key2 == SCAN_CODE_ESC) NewElement(0);
if (key2 == SCAN_CODE_ENTER) NewElement(1);
EAX=key<<8;
if (key_scancode == SCAN_CODE_ESC) NewElement(0);
if (key_scancode == SCAN_CODE_ENTER) NewElement(1);
EAX= key_ascii << 8;
edit_box_key stdcall (#new_file_ed);
break;
}
if (files.ProcessKey(key2))
if (files.ProcessKey(key_scancode))
{
List_ReDraw();
break;
}
 
if (TestBit(status_key, 2))
if (TestBit(key_modifier, 2))
{
switch(key2)
switch(key_scancode)
{
case 059...068:
key2 -= 59;
if (key2<disc_num)
key_scancode -= 59;
if (key_scancode<disc_num)
{
DrawRectangle(17,key2*16+74,159,16, 0); //display click
DrawRectangle(17,key_scancode*16+74,159,16, 0); //display click
pause(7);
ClickOnDisk(key2);
ClickOnDisk(key_scancode);
}
break;
case 45: //Ctrl+X
415,7 → 410,7
break;
}
 
switch (key2)
switch (key_scancode)
{
case 041:
two_panels ^= 1;
453,13 → 448,13
if (files.KeyDown()) List_ReDraw();
break;
case 059...068: //F1-F10
FnProcess(key2-58);
FnProcess(key_scancode-58);
break;
default:
for (i=files.current+1; i<files.count; i++)
{
strcpy(#temp, file_mas[i]*304+buf+72);
if (temp[0]==key) || (temp[0]==key-32)
if (temp[0]==key_ascii) || (temp[0]==key_ascii-32)
{
files.current = i - 1;
files.KeyDown();
/programs/cmm/lib/kolibri.h
84,6 → 84,41
#define SCAN_CODE_PGDN 081
#define SCAN_CODE_PGUP 073
 
 
inline fastcall word GetKey() //+Gluk fix
{
$push edx
GETKEY:
$mov eax,2
$int 0x40
$cmp eax,1
$jne GETKEYI
$mov ah,dh
$jmp GETKEYII //jz?
GETKEYI:
$mov dh,ah
$jmp GETKEY
GETKEYII:
$pop edx
$shr eax,8
}
 
unsigned char key_ascii;
dword key_scancode, key_modifier;
int GetKeys()
{
$mov eax,2
$int 0x40
key_ascii = AH;
$shr eax,16
key_scancode = AL;
//get alt/shift/ctrl key status
$mov eax,66
$mov ebx,3
$int 0x40
key_modifier = EAX;
}
 
//allow event mask
#define EVENT_MASK_REDRAW 000000001b
#define EVENT_MASK_KEYBOARD 000000010b
141,44 → 176,7
$int 0x40
}
 
inline fastcall ScancodesGeting(){
$mov eax,66
$mov ebx,1
$mov ecx,1 //᪠­ª®¤ë
$int 0x40
}
 
inline fastcall GetStatusKey(){
$mov eax,66
$mov ebx,3
$int 0x40
}
 
inline fastcall word GetKey() //+Gluk fix
{
$push edx
GETKEY:
$mov eax,2
$int 0x40
$cmp eax,1
$jne GETKEYI
$mov ah,dh
$jmp GETKEYII //jz?
GETKEYI:
$mov dh,ah
$jmp GETKEY
GETKEYII:
$pop edx
$shr eax,8
}
 
inline fastcall int GetFullKey()
{
$mov eax,2
$int 0x40
}
 
 
inline fastcall pause(EBX)
{
$mov eax, 5
/programs/cmm/pixie/pixie.c
74,7 → 74,6
void main()
{
int id;
word key_ascii, key_scancode;
 
byte mouse_clicked;
dword tmp_x,tmp_y;
231,10 → 230,7
break;
case evKey:
GetFullKey();
key_ascii = AH;
$shr eax,16
key_scancode = AL;
GetKeys();
if (key_scancode==003) SetColorThemeLight();
if (key_scancode==004) SetColorThemeDark();