forked from Shinonome/alt-illogical-impulse
ac6d3adeb9
BREAKING CHANGE: Remove external dots-hyprland dependency - Imported all essential configs from dots-hyprland/installer-replication - Added complete configs/ directory with: - hypr/ - Hyprland configuration - quickshell/ - Quickshell widgets and config - applications/ - Application configurations - scripts/ - Utility scripts - matugen/ - Material You theming - Updated flake.nix to use local ./configs instead of external repo - Simplified update-flake script (removed external repo management) - Updated README to reflect self-contained architecture - All builds pass with local configurations Benefits: - No external repository dependencies - Faster builds (no network dependencies) - Version controlled configs in single repo - Easier maintenance and development - Complete installer replication in one place
48 lines
1.3 KiB
QML
48 lines
1.3 KiB
QML
pragma Singleton
|
|
|
|
import qs.modules.common
|
|
import Quickshell
|
|
|
|
Singleton {
|
|
id: root
|
|
property int shiftMode: 0 // 0: off, 1: on, 2: lock
|
|
property list<int> shiftKeys: [42, 54] // Keycodes for Shift keys (left and right)
|
|
property list<int> altKeys: [56, 100] // Keycodes for Alt keys (left and right)
|
|
property list<int> ctrlKeys: [29, 97] // Keycodes for Ctrl keys (left and right)
|
|
|
|
function releaseAllKeys() {
|
|
const keycodes = Array.from(Array(249).keys());
|
|
Quickshell.execDetached([
|
|
"ydotool",
|
|
"key", "--key-delay", "0",
|
|
...keycodes.map(keycode => `${keycode}:0`)
|
|
])
|
|
root.shiftMode = 0; // Reset shift mode
|
|
}
|
|
|
|
function releaseShiftKeys() {
|
|
Quickshell.execDetached([
|
|
"ydotool",
|
|
"key", "--key-delay", "0",
|
|
...root.shiftKeys.map(keycode => `${keycode}:0`)
|
|
])
|
|
root.shiftMode = 0; // Reset shift mode
|
|
}
|
|
|
|
function press(keycode) {
|
|
Quickshell.execDetached([
|
|
"ydotool",
|
|
"key", "--key-delay", "0",
|
|
`${keycode}:1`
|
|
]);
|
|
}
|
|
|
|
function release(keycode) {
|
|
Quickshell.execDetached([
|
|
"ydotool",
|
|
"key", "--key-delay", "0",
|
|
`${keycode}:0`
|
|
]);
|
|
}
|
|
}
|