diff --git a/programs/cmm/Calypte/Calypte.c b/programs/cmm/Calypte/Calypte.c index 53c470f4df..1660737302 100644 --- a/programs/cmm/Calypte/Calypte.c +++ b/programs/cmm/Calypte/Calypte.c @@ -112,8 +112,6 @@ menu_data menudata1 = {0, 40, 2, 15, 2, #menu_text_area1.menu, #menu_text_area1. void main() { int id; - word key_ascii, key_scancode; - dword status_key; strcpy(#filter2.ext1, "TXT"); //strcpy(#filter2.ext2, "ASM"); @@ -185,13 +183,9 @@ void main() 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) { diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c index bb8237e420..51a483d896 100644 --- a/programs/cmm/appearance/appearance.c +++ b/programs/cmm/appearance/appearance.c @@ -146,8 +146,6 @@ OpenFile() 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 @@ void main() 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(); diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index e572190898..79c73bc6d7 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -105,8 +105,7 @@ byte cmd_free=0; 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 @@ void main() 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