From a559b635cff516aa7a25fa9cd455102e8840dd6a Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Sat, 28 Nov 2020 13:47:59 +0200 Subject: [PATCH 1/3] feat: add UnicodeCharacters module --- src/Lunapark/UnicodeCharacters.purs | 157 ++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 src/Lunapark/UnicodeCharacters.purs diff --git a/src/Lunapark/UnicodeCharacters.purs b/src/Lunapark/UnicodeCharacters.purs new file mode 100644 index 0000000..d9112a7 --- /dev/null +++ b/src/Lunapark/UnicodeCharacters.purs @@ -0,0 +1,157 @@ +module Lunapark.UnicodeCharacters where + +-- copied from https://github.com/webdriverio/webdriverio/blob/13d3a3419b951803c5e7a5db53e48764ca58f371/packages/webdriverio/src/constants.js#L315 +unicodeCharacters :: + { "NULL" :: Char + , "Unidentified" :: Char + , "Cancel" :: Char + , "Help" :: Char + , "Back space" :: Char + , "Backspace" :: Char + , "Tab" :: Char + , "Clear" :: Char + , "Return" :: Char + , "Enter" :: Char + , "Shift" :: Char + , "Control" :: Char + , "Control Left" :: Char + , "Control Right" :: Char + , "Alt" :: Char + , "Pause" :: Char + , "Escape" :: Char + , "Space" :: Char + , " " :: Char + , "Pageup" :: Char + , "PageUp" :: Char + , "Page_Up" :: Char + , "Pagedown" :: Char + , "PageDown" :: Char + , "Page_Down" :: Char + , "End" :: Char + , "Home" :: Char + , "Left arrow" :: Char + , "Arrow_Left" :: Char + , "ArrowLeft" :: Char + , "Up arrow" :: Char + , "Arrow_Up" :: Char + , "ArrowUp" :: Char + , "Right arrow" :: Char + , "Arrow_Right" :: Char + , "ArrowRight" :: Char + , "Down arrow" :: Char + , "Arrow_Down" :: Char + , "ArrowDown" :: Char + , "Insert" :: Char + , "Delete" :: Char + , "Semicolon" :: Char + , "Equals" :: Char + , "Numpad 0" :: Char + , "Numpad 1" :: Char + , "Numpad 2" :: Char + , "Numpad 3" :: Char + , "Numpad 4" :: Char + , "Numpad 5" :: Char + , "Numpad 6" :: Char + , "Numpad 7" :: Char + , "Numpad 8" :: Char + , "Numpad 9" :: Char + , "Multiply" :: Char + , "Add" :: Char + , "Separator" :: Char + , "Subtract" :: Char + , "Decimal" :: Char + , "Divide" :: Char + , "F1" :: Char + , "F2" :: Char + , "F3" :: Char + , "F4" :: Char + , "F5" :: Char + , "F6" :: Char + , "F7" :: Char + , "F8" :: Char + , "F9" :: Char + , "F10" :: Char + , "F11" :: Char + , "F12" :: Char + , "Command" :: Char + , "Meta" :: Char + , "Zenkaku_Hankaku" :: Char + , "ZenkakuHankaku" :: Char + } +unicodeCharacters = + { "NULL": '\xE000' + , "Unidentified": '\xE000' + , "Cancel": '\xE001' + , "Help": '\xE002' + , "Back space": '\xE003' + , "Backspace": '\xE003' + , "Tab": '\xE004' + , "Clear": '\xE005' + , "Return": '\xE006' + , "Enter": '\xE007' + , "Shift": '\xE008' + , "Control": '\xE009' + , "Control Left": '\xE009' + , "Control Right": '\xE051' + , "Alt": '\xE00A' + , "Pause": '\xE00B' + , "Escape": '\xE00C' + , "Space": '\xE00D' + , " ": '\xE00D' + , "Pageup": '\xE00E' + , "PageUp": '\xE00E' + , "Page_Up": '\xE00E' + , "Pagedown": '\xE00F' + , "PageDown": '\xE00F' + , "Page_Down": '\xE00F' + , "End": '\xE010' + , "Home": '\xE011' + , "Left arrow": '\xE012' + , "Arrow_Left": '\xE012' + , "ArrowLeft": '\xE012' + , "Up arrow": '\xE013' + , "Arrow_Up": '\xE013' + , "ArrowUp": '\xE013' + , "Right arrow": '\xE014' + , "Arrow_Right": '\xE014' + , "ArrowRight": '\xE014' + , "Down arrow": '\xE015' + , "Arrow_Down": '\xE015' + , "ArrowDown": '\xE015' + , "Insert": '\xE016' + , "Delete": '\xE017' + , "Semicolon": '\xE018' + , "Equals": '\xE019' + , "Numpad 0": '\xE01A' + , "Numpad 1": '\xE01B' + , "Numpad 2": '\xE01C' + , "Numpad 3": '\xE01D' + , "Numpad 4": '\xE01E' + , "Numpad 5": '\xE01F' + , "Numpad 6": '\xE020' + , "Numpad 7": '\xE021' + , "Numpad 8": '\xE022' + , "Numpad 9": '\xE023' + , "Multiply": '\xE024' + , "Add": '\xE025' + , "Separator": '\xE026' + , "Subtract": '\xE027' + , "Decimal": '\xE028' + , "Divide": '\xE029' + , "F1": '\xE031' + , "F2": '\xE032' + , "F3": '\xE033' + , "F4": '\xE034' + , "F5": '\xE035' + , "F6": '\xE036' + , "F7": '\xE037' + , "F8": '\xE038' + , "F9": '\xE039' + , "F10": '\xE03A' + , "F11": '\xE03B' + , "F12": '\xE03C' + , "Command": '\xE03D' + , "Meta": '\xE03D' + , "Zenkaku_Hankaku": '\xE040' + , "ZenkakuHankaku": '\xE040' + } From 77834a83cc650aa1351e4dbdfd3c2ff90d7253e2 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Sat, 28 Nov 2020 15:24:16 +0200 Subject: [PATCH 2/3] feat: add UnicodeCharacters module -> change to functions --- src/Lunapark/UnicodeCharacters.purs | 328 +++++++++++++++------------- 1 file changed, 174 insertions(+), 154 deletions(-) diff --git a/src/Lunapark/UnicodeCharacters.purs b/src/Lunapark/UnicodeCharacters.purs index d9112a7..d3581b9 100644 --- a/src/Lunapark/UnicodeCharacters.purs +++ b/src/Lunapark/UnicodeCharacters.purs @@ -1,157 +1,177 @@ module Lunapark.UnicodeCharacters where -- copied from https://github.com/webdriverio/webdriverio/blob/13d3a3419b951803c5e7a5db53e48764ca58f371/packages/webdriverio/src/constants.js#L315 -unicodeCharacters :: - { "NULL" :: Char - , "Unidentified" :: Char - , "Cancel" :: Char - , "Help" :: Char - , "Back space" :: Char - , "Backspace" :: Char - , "Tab" :: Char - , "Clear" :: Char - , "Return" :: Char - , "Enter" :: Char - , "Shift" :: Char - , "Control" :: Char - , "Control Left" :: Char - , "Control Right" :: Char - , "Alt" :: Char - , "Pause" :: Char - , "Escape" :: Char - , "Space" :: Char - , " " :: Char - , "Pageup" :: Char - , "PageUp" :: Char - , "Page_Up" :: Char - , "Pagedown" :: Char - , "PageDown" :: Char - , "Page_Down" :: Char - , "End" :: Char - , "Home" :: Char - , "Left arrow" :: Char - , "Arrow_Left" :: Char - , "ArrowLeft" :: Char - , "Up arrow" :: Char - , "Arrow_Up" :: Char - , "ArrowUp" :: Char - , "Right arrow" :: Char - , "Arrow_Right" :: Char - , "ArrowRight" :: Char - , "Down arrow" :: Char - , "Arrow_Down" :: Char - , "ArrowDown" :: Char - , "Insert" :: Char - , "Delete" :: Char - , "Semicolon" :: Char - , "Equals" :: Char - , "Numpad 0" :: Char - , "Numpad 1" :: Char - , "Numpad 2" :: Char - , "Numpad 3" :: Char - , "Numpad 4" :: Char - , "Numpad 5" :: Char - , "Numpad 6" :: Char - , "Numpad 7" :: Char - , "Numpad 8" :: Char - , "Numpad 9" :: Char - , "Multiply" :: Char - , "Add" :: Char - , "Separator" :: Char - , "Subtract" :: Char - , "Decimal" :: Char - , "Divide" :: Char - , "F1" :: Char - , "F2" :: Char - , "F3" :: Char - , "F4" :: Char - , "F5" :: Char - , "F6" :: Char - , "F7" :: Char - , "F8" :: Char - , "F9" :: Char - , "F10" :: Char - , "F11" :: Char - , "F12" :: Char - , "Command" :: Char - , "Meta" :: Char - , "Zenkaku_Hankaku" :: Char - , "ZenkakuHankaku" :: Char - } -unicodeCharacters = - { "NULL": '\xE000' - , "Unidentified": '\xE000' - , "Cancel": '\xE001' - , "Help": '\xE002' - , "Back space": '\xE003' - , "Backspace": '\xE003' - , "Tab": '\xE004' - , "Clear": '\xE005' - , "Return": '\xE006' - , "Enter": '\xE007' - , "Shift": '\xE008' - , "Control": '\xE009' - , "Control Left": '\xE009' - , "Control Right": '\xE051' - , "Alt": '\xE00A' - , "Pause": '\xE00B' - , "Escape": '\xE00C' - , "Space": '\xE00D' - , " ": '\xE00D' - , "Pageup": '\xE00E' - , "PageUp": '\xE00E' - , "Page_Up": '\xE00E' - , "Pagedown": '\xE00F' - , "PageDown": '\xE00F' - , "Page_Down": '\xE00F' - , "End": '\xE010' - , "Home": '\xE011' - , "Left arrow": '\xE012' - , "Arrow_Left": '\xE012' - , "ArrowLeft": '\xE012' - , "Up arrow": '\xE013' - , "Arrow_Up": '\xE013' - , "ArrowUp": '\xE013' - , "Right arrow": '\xE014' - , "Arrow_Right": '\xE014' - , "ArrowRight": '\xE014' - , "Down arrow": '\xE015' - , "Arrow_Down": '\xE015' - , "ArrowDown": '\xE015' - , "Insert": '\xE016' - , "Delete": '\xE017' - , "Semicolon": '\xE018' - , "Equals": '\xE019' - , "Numpad 0": '\xE01A' - , "Numpad 1": '\xE01B' - , "Numpad 2": '\xE01C' - , "Numpad 3": '\xE01D' - , "Numpad 4": '\xE01E' - , "Numpad 5": '\xE01F' - , "Numpad 6": '\xE020' - , "Numpad 7": '\xE021' - , "Numpad 8": '\xE022' - , "Numpad 9": '\xE023' - , "Multiply": '\xE024' - , "Add": '\xE025' - , "Separator": '\xE026' - , "Subtract": '\xE027' - , "Decimal": '\xE028' - , "Divide": '\xE029' - , "F1": '\xE031' - , "F2": '\xE032' - , "F3": '\xE033' - , "F4": '\xE034' - , "F5": '\xE035' - , "F6": '\xE036' - , "F7": '\xE037' - , "F8": '\xE038' - , "F9": '\xE039' - , "F10": '\xE03A' - , "F11": '\xE03B' - , "F12": '\xE03C' - , "Command": '\xE03D' - , "Meta": '\xE03D' - , "Zenkaku_Hankaku": '\xE040' - , "ZenkakuHankaku": '\xE040' - } + +unidentified :: Char +unidentified = '\xE000' + +cancel :: Char +cancel = '\xE001' + +help :: Char +help = '\xE002' + +backspace :: Char +backspace = '\xE003' + +tab :: Char +tab = '\xE004' + +clear :: Char +clear = '\xE005' + +return :: Char +return = '\xE006' + +enter :: Char +enter = '\xE007' + +shift :: Char +shift = '\xE008' + +controlLeft :: Char +controlLeft = '\xE009' + +controlRight :: Char +controlRight = '\xE051' + +alt :: Char +alt = '\xE00A' + +pause :: Char +pause = '\xE00B' + +escape :: Char +escape = '\xE00C' + +space :: Char +space = '\xE00D' + +pageUp :: Char +pageUp = '\xE00E' + +pageDown :: Char +pageDown = '\xE00F' + +end :: Char +end = '\xE010' + +home :: Char +home = '\xE011' + +arrowLeft :: Char +arrowLeft = '\xE012' + +arrowUp :: Char +arrowUp = '\xE013' + +arrowRight :: Char +arrowRight = '\xE014' + +arrowDown :: Char +arrowDown = '\xE015' + +insert :: Char +insert = '\xE016' + +delete :: Char +delete = '\xE017' + +semicolon :: Char +semicolon = '\xE018' + +equals :: Char +equals = '\xE019' + +numpad0 :: Char +numpad0 = '\xE01A' + +numpad1 :: Char +numpad1 = '\xE01B' + +numpad2 :: Char +numpad2 = '\xE01C' + +numpad3 :: Char +numpad3 = '\xE01D' + +numpad4 :: Char +numpad4 = '\xE01E' + +numpad5 :: Char +numpad5 = '\xE01F' + +numpad6 :: Char +numpad6 = '\xE020' + +numpad7 :: Char +numpad7 = '\xE021' + +numpad8 :: Char +numpad8 = '\xE022' + +numpad9 :: Char +numpad9 = '\xE023' + +multiply :: Char +multiply = '\xE024' + +add :: Char +add = '\xE025' + +separator :: Char +separator = '\xE026' + +subtract :: Char +subtract = '\xE027' + +decimal :: Char +decimal = '\xE028' + +divide :: Char +divide = '\xE029' + +f1 :: Char +f1 = '\xE031' + +f2 :: Char +f2 = '\xE032' + +f3 :: Char +f3 = '\xE033' + +f4 :: Char +f4 = '\xE034' + +f5 :: Char +f5 = '\xE035' + +f6 :: Char +f6 = '\xE036' + +f7 :: Char +f7 = '\xE037' + +f8 :: Char +f8 = '\xE038' + +f9 :: Char +f9 = '\xE039' + +f10 :: Char +f10 = '\xE03A' + +f11 :: Char +f11 = '\xE03B' + +f12 :: Char +f12 = '\xE03C' + +command :: Char +command = '\xE03D' + +meta :: Char +meta = '\xE03D' + +zenkakuHankaku :: Char +zenkakuHankaku = '\xE040' From 27309034217a92575a9a41ff4486b30661017860 Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Mon, 30 Nov 2020 14:19:22 +0200 Subject: [PATCH 3/3] feat: use unicode --- src/Lunapark/UnicodeCharacters.purs | 116 ++++++++++++++-------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/src/Lunapark/UnicodeCharacters.purs b/src/Lunapark/UnicodeCharacters.purs index d3581b9..7e0ea8d 100644 --- a/src/Lunapark/UnicodeCharacters.purs +++ b/src/Lunapark/UnicodeCharacters.purs @@ -2,176 +2,176 @@ module Lunapark.UnicodeCharacters where -- copied from https://github.com/webdriverio/webdriverio/blob/13d3a3419b951803c5e7a5db53e48764ca58f371/packages/webdriverio/src/constants.js#L315 -unidentified :: Char +unidentified ∷ Char unidentified = '\xE000' -cancel :: Char +cancel ∷ Char cancel = '\xE001' -help :: Char +help ∷ Char help = '\xE002' -backspace :: Char +backspace ∷ Char backspace = '\xE003' -tab :: Char +tab ∷ Char tab = '\xE004' -clear :: Char +clear ∷ Char clear = '\xE005' -return :: Char +return ∷ Char return = '\xE006' -enter :: Char +enter ∷ Char enter = '\xE007' -shift :: Char +shift ∷ Char shift = '\xE008' -controlLeft :: Char +controlLeft ∷ Char controlLeft = '\xE009' -controlRight :: Char +controlRight ∷ Char controlRight = '\xE051' -alt :: Char +alt ∷ Char alt = '\xE00A' -pause :: Char +pause ∷ Char pause = '\xE00B' -escape :: Char +escape ∷ Char escape = '\xE00C' -space :: Char +space ∷ Char space = '\xE00D' -pageUp :: Char +pageUp ∷ Char pageUp = '\xE00E' -pageDown :: Char +pageDown ∷ Char pageDown = '\xE00F' -end :: Char +end ∷ Char end = '\xE010' -home :: Char +home ∷ Char home = '\xE011' -arrowLeft :: Char +arrowLeft ∷ Char arrowLeft = '\xE012' -arrowUp :: Char +arrowUp ∷ Char arrowUp = '\xE013' -arrowRight :: Char +arrowRight ∷ Char arrowRight = '\xE014' -arrowDown :: Char +arrowDown ∷ Char arrowDown = '\xE015' -insert :: Char +insert ∷ Char insert = '\xE016' -delete :: Char +delete ∷ Char delete = '\xE017' -semicolon :: Char +semicolon ∷ Char semicolon = '\xE018' -equals :: Char +equals ∷ Char equals = '\xE019' -numpad0 :: Char +numpad0 ∷ Char numpad0 = '\xE01A' -numpad1 :: Char +numpad1 ∷ Char numpad1 = '\xE01B' -numpad2 :: Char +numpad2 ∷ Char numpad2 = '\xE01C' -numpad3 :: Char +numpad3 ∷ Char numpad3 = '\xE01D' -numpad4 :: Char +numpad4 ∷ Char numpad4 = '\xE01E' -numpad5 :: Char +numpad5 ∷ Char numpad5 = '\xE01F' -numpad6 :: Char +numpad6 ∷ Char numpad6 = '\xE020' -numpad7 :: Char +numpad7 ∷ Char numpad7 = '\xE021' -numpad8 :: Char +numpad8 ∷ Char numpad8 = '\xE022' -numpad9 :: Char +numpad9 ∷ Char numpad9 = '\xE023' -multiply :: Char +multiply ∷ Char multiply = '\xE024' -add :: Char +add ∷ Char add = '\xE025' -separator :: Char +separator ∷ Char separator = '\xE026' -subtract :: Char +subtract ∷ Char subtract = '\xE027' -decimal :: Char +decimal ∷ Char decimal = '\xE028' -divide :: Char +divide ∷ Char divide = '\xE029' -f1 :: Char +f1 ∷ Char f1 = '\xE031' -f2 :: Char +f2 ∷ Char f2 = '\xE032' -f3 :: Char +f3 ∷ Char f3 = '\xE033' -f4 :: Char +f4 ∷ Char f4 = '\xE034' -f5 :: Char +f5 ∷ Char f5 = '\xE035' -f6 :: Char +f6 ∷ Char f6 = '\xE036' -f7 :: Char +f7 ∷ Char f7 = '\xE037' -f8 :: Char +f8 ∷ Char f8 = '\xE038' -f9 :: Char +f9 ∷ Char f9 = '\xE039' -f10 :: Char +f10 ∷ Char f10 = '\xE03A' -f11 :: Char +f11 ∷ Char f11 = '\xE03B' -f12 :: Char +f12 ∷ Char f12 = '\xE03C' -command :: Char +command ∷ Char command = '\xE03D' -meta :: Char +meta ∷ Char meta = '\xE03D' -zenkakuHankaku :: Char +zenkakuHankaku ∷ Char zenkakuHankaku = '\xE040'