Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikachu2333 authored Jun 8, 2024
1 parent 9281a49 commit be3ae1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sc_starter"
version = "1.2.0"
version = "1.3.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
20 changes: 11 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,17 @@ fn match_keys(groups: KeyStringGroups) -> (bool, KeyVkGroups) {
results_mod.push(tmp);
}

let result_vk = match VKey::from_keyname(&group2) {
Ok(vk_key) => vk_key,
Err(_) => VKey::OemClear,
let result_vk = if group2.len() != 1 {
match VKey::from_keyname(&group2.to_ascii_uppercase()) {
Ok(vk_key) => vk_key,
Err(_) => VKey::OemClear,
}
} else {
match VKey::from_keyname(&group2) {
Ok(vk_key) => vk_key,
Err(_) => VKey::OemClear,
}
};

let mut success = true;
for i in &results_mod {
if *i == ModKey::NoRepeat {
Expand Down Expand Up @@ -273,10 +279,6 @@ fn main() {
let settings = read_config(&path_infos.conf_path, &default_setting);
println!("{:?}", &settings);
//Set Hotkeys
let handler = set_hotkeys(
&path_infos.exe_path,
&path_infos.conf_path,
settings,
);
let handler = set_hotkeys(&path_infos.exe_path, &path_infos.conf_path, settings);
handler.join().unwrap();
}

0 comments on commit be3ae1b

Please sign in to comment.