Skip to content

Commit 6368b10

Browse files
committed
add remaining keys
1 parent 26bc7a4 commit 6368b10

File tree

1 file changed

+93
-4
lines changed

1 file changed

+93
-4
lines changed

src/engines/ultralight.rs

+93-4
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ pub struct UltalightTabInfo {
4242

4343
impl TabInfo for UltalightTabInfo {
4444
fn title(&self) -> String {
45-
self.view
46-
.title()
47-
.expect("Failed to get title from ultralight")
45+
self.view.title().unwrap_or("Title Error".to_string())
4846
}
4947

5048
fn url(&self) -> String {
@@ -584,7 +582,7 @@ fn iced_key_to_ultralight_key(
584582
keyboard::key::Named::F12 => (
585583
VirtualKeyCode::F12,
586584
#[cfg(windows)]
587-
122,
585+
123,
588586
#[cfg(unix)]
589587
70,
590588
),
@@ -864,6 +862,97 @@ fn iced_key_to_ultralight_key(
864862
#[cfg(unix)]
865863
39,
866864
),
865+
"-" => (
866+
VirtualKeyCode::OemMinus,
867+
#[cfg(windows)]
868+
189,
869+
#[cfg(unix)]
870+
12,
871+
),
872+
"_" => (
873+
VirtualKeyCode::OemMinus,
874+
#[cfg(windows)]
875+
189,
876+
#[cfg(unix)]
877+
12,
878+
),
879+
"+" => (
880+
VirtualKeyCode::OemPlus,
881+
#[cfg(windows)]
882+
187,
883+
#[cfg(unix)]
884+
78,
885+
),
886+
"=" => (
887+
VirtualKeyCode::OemPlus,
888+
#[cfg(windows)]
889+
187,
890+
#[cfg(unix)]
891+
78,
892+
),
893+
"\\" => (
894+
VirtualKeyCode::Oem5,
895+
#[cfg(windows)]
896+
220,
897+
#[cfg(unix)]
898+
43,
899+
),
900+
"|" => (
901+
VirtualKeyCode::Oem5,
902+
#[cfg(windows)]
903+
220,
904+
#[cfg(unix)]
905+
43,
906+
),
907+
"`" => (
908+
VirtualKeyCode::Oem3,
909+
#[cfg(windows)]
910+
192,
911+
#[cfg(unix)]
912+
41,
913+
),
914+
"?" => (
915+
VirtualKeyCode::Oem2,
916+
#[cfg(windows)]
917+
191,
918+
#[cfg(unix)]
919+
53,
920+
),
921+
"/" => (
922+
VirtualKeyCode::Oem2,
923+
#[cfg(windows)]
924+
191,
925+
#[cfg(unix)]
926+
53,
927+
),
928+
">" => (
929+
VirtualKeyCode::Oem102,
930+
#[cfg(windows)]
931+
226,
932+
#[cfg(unix)]
933+
52,
934+
),
935+
"<" => (
936+
VirtualKeyCode::Oem102,
937+
#[cfg(windows)]
938+
226,
939+
#[cfg(unix)]
940+
52,
941+
),
942+
"[" => (
943+
VirtualKeyCode::Oem4,
944+
#[cfg(windows)]
945+
219,
946+
#[cfg(unix)]
947+
26,
948+
),
949+
"]" => (
950+
VirtualKeyCode::Oem6,
951+
#[cfg(windows)]
952+
221,
953+
#[cfg(unix)]
954+
27,
955+
),
867956
_ => return None,
868957
},
869958
keyboard::Key::Unidentified => return None,

0 commit comments

Comments
 (0)