Commit 6550e3da authored by Diederik van Arkel's avatar Diederik van Arkel

Moved module key to os dependant layer

parent ceabfacb
definition module key
definition module oskey
// Clean Object I/O library, version 1.2
......@@ -36,6 +36,7 @@ helpKey :: SpecialKey // Help
leftKey :: SpecialKey // Arrow left
pgDownKey :: SpecialKey // Page down
pgUpKey :: SpecialKey // Page up
returnKey :: SpecialKey // Return
rightKey :: SpecialKey // Arrow right
upKey :: SpecialKey // Arrow up
......
implementation module key
implementation module oskey
// Clean Object I/O library, version 1.2
......@@ -11,13 +11,13 @@ import StdBool, StdClass, StdInt, StdOverloaded, StdString
= { virtual :: !Int
}
BackSpaceVirtualCode:== 51 // BackSpace
BackSpaceVirtualCode:== 8 // BackSpace
BeginVirtualCode :== 115 // Begin of text
ClearVirtualCode :== 71 // Clear
DeleteVirtualCode :== 117 // Delete
DownVirtualCode :== 125 // Arrow down
EndVirtualCode :== 119 // End of text
EnterVirtualCode :== 76 // Enter // PA: wat was er mis met 13?
EnterVirtualCode :== 13 // Enter
EscapeVirtualCode :== 53 // Escape
F1VirtualCode :== 122 // Function 1
F2VirtualCode :== 120 // Function 2
......@@ -38,6 +38,7 @@ HelpVirtualCode :== 114 // Help
LeftVirtualCode :== 123 // Arrow left
PgDownVirtualCode :== 121 // Page down
PgUpVirtualCode :== 116 // Page up
ReturnVirtualCode :== -1 // Return (dummy under Windows)
RightVirtualCode :== 124 // Arrow right
UpVirtualCode :== 126 // Arrow up
......@@ -76,6 +77,7 @@ instance toString SpecialKey where
specialKeyCodeName LeftVirtualCode = "LeftKey"
specialKeyCodeName PgDownVirtualCode = "PgDownKey"
specialKeyCodeName PgUpVirtualCode = "PgUpKey"
specialKeyCodeName ReturnVirtualCode = "ReturnKey"
specialKeyCodeName RightVirtualCode = "RightKey"
specialKeyCodeName UpVirtualCode = "UpKey"
specialKeyCodeName otherCode = "toSpecialKey "+++toString otherCode
......@@ -107,6 +109,7 @@ helpKey :: SpecialKey; helpKey = {virtual=HelpVirtualCode} // Help
leftKey :: SpecialKey; leftKey = {virtual=LeftVirtualCode} // Arrow left
pgDownKey :: SpecialKey; pgDownKey = {virtual=PgDownVirtualCode} // Page down
pgUpKey :: SpecialKey; pgUpKey = {virtual=PgUpVirtualCode} // Page up
returnKey :: SpecialKey; returnKey = {virtual=ReturnVirtualCode} // Return
rightKey :: SpecialKey; rightKey = {virtual=RightVirtualCode} // Arrow right
upKey :: SpecialKey; upKey = {virtual=UpVirtualCode} // Arrow up
......@@ -126,9 +129,9 @@ where
virtualKeyCodes :: [Int] // The < sorted list of virtual key codes
virtualKeyCodes =: [ BackSpaceVirtualCode // 8
, EnterVirtualCode // 13
, EscapeVirtualCode // 53
, ClearVirtualCode // 71
, EnterVirtualCode // 76
, F5VirtualCode // 96
, F6VirtualCode // 97
, F7VirtualCode // 98
......
......@@ -8,7 +8,7 @@ definition module StdKey
// ********************************************************************************
from key import SpecialKey,
from oskey import SpecialKey,
backSpaceKey, beginKey,
clearKey,
deleteKey, downKey,
......@@ -19,6 +19,6 @@ from key import SpecialKey,
helpKey,
leftKey,
pgDownKey, pgUpKey,
rightKey,
returnKey, rightKey,
upKey,
==, toString
......@@ -18,12 +18,12 @@ import StdMaybe
newFocusItems :: !*[FocusItem] -> *KeyFocus
copyKeyFocus :: !*KeyFocus -> (!KeyFocus,!*KeyFocus)
/* DvA: unused?
openFocusItems :: !(Maybe Int) !*[FocusItem] !*KeyFocus -> *KeyFocus
closeFocusItems :: ![Int] !*KeyFocus -> *KeyFocus
showFocusItems :: ![Int] !*KeyFocus -> *KeyFocus
hideFocusItems :: ![Int] !*KeyFocus -> *KeyFocus
*/
getCurrentFocusItem :: !*KeyFocus -> (!Maybe Int,!*KeyFocus)
setNoFocusItem :: !*KeyFocus -> *KeyFocus
setNewFocusItem :: !Int !*KeyFocus -> *KeyFocus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment