@@ -54,6 +54,7 @@ impl Default for Page {
5454 fl!( "super-key" , "launcher" ) ,
5555 fl!( "super-key" , "workspaces" ) ,
5656 fl!( "super-key" , "applications" ) ,
57+ fl!( "super-key" , "disable" ) ,
5758 ] ,
5859 super_key_active : super_key_active_config ( ) ,
5960 comp_config,
@@ -68,9 +69,10 @@ impl Page {
6869 match message {
6970 Message :: SuperKey ( id) => {
7071 let action = match id {
71- 0 => shortcuts:: action:: System :: Launcher ,
72- 1 => shortcuts:: action:: System :: WorkspaceOverview ,
73- 2 => shortcuts:: action:: System :: AppLibrary ,
72+ 0 => Some ( shortcuts:: action:: System :: Launcher ) ,
73+ 1 => Some ( shortcuts:: action:: System :: WorkspaceOverview ) ,
74+ 2 => Some ( shortcuts:: action:: System :: AppLibrary ) ,
75+ 3 => None ,
7476 _ => return ,
7577 } ;
7678
@@ -131,6 +133,7 @@ pub fn super_key_action() -> Section<crate::pages::Message> {
131133 let _launcher = descriptions. insert ( fl ! ( "super-key" , "launcher" ) ) ;
132134 let _workspaces = descriptions. insert ( fl ! ( "super-key" , "workspaces" ) ) ;
133135 let _applications = descriptions. insert ( fl ! ( "super-key" , "applications" ) ) ;
136+ let _disable = descriptions. insert ( fl ! ( "super-key" , "disable" ) ) ;
134137
135138 Section :: default ( )
136139 . descriptions ( descriptions)
@@ -240,16 +243,17 @@ fn super_key_active_config() -> Option<usize> {
240243 new_id
241244}
242245
243- fn super_key_set ( action : shortcuts:: action:: System ) {
246+ fn super_key_set ( action : Option < shortcuts:: action:: System > ) {
244247 let Ok ( config) = shortcuts:: context ( ) else {
245248 return ;
246249 } ;
247250
248251 let mut shortcuts = config. get :: < Shortcuts > ( "custom" ) . unwrap_or_default ( ) ;
252+ let action = action. map ( Action :: System ) . unwrap_or ( Action :: Disable ) ;
249253
250254 shortcuts. 0 . insert (
251255 Binding :: new ( shortcuts:: Modifiers :: new ( ) . logo ( ) , None ) ,
252- Action :: System ( action) ,
256+ action,
253257 ) ;
254258
255259 _ = config. set ( "custom" , & shortcuts) ;
0 commit comments