@@ -7,7 +7,7 @@ use crate::{
77 cosmic_keystate_from_smithay, cosmic_modifiers_eq_smithay,
88 cosmic_modifiers_from_smithay,
99 } ,
10- Action , Config , PrivateAction , X11_KEYCODE_OFFSET ,
10+ Action , Config , PrivateAction ,
1111 } ,
1212 input:: gestures:: { GestureState , SwipeAction } ,
1313 shell:: {
@@ -35,8 +35,8 @@ use calloop::{
3535 RegistrationToken ,
3636} ;
3737use cosmic_comp_config:: { workspace:: WorkspaceLayout , NumlockState } ;
38+ use cosmic_settings_config:: shortcuts;
3839use cosmic_settings_config:: shortcuts:: action:: { Direction , ResizeDirection } ;
39- use cosmic_settings_config:: { shortcuts, Binding } ;
4040use smithay:: {
4141 backend:: input:: {
4242 AbsolutePositionEvent , Axis , AxisSource , Device , DeviceCapability , GestureBeginEvent ,
@@ -213,32 +213,11 @@ impl State {
213213 self . common . idle_notifier_state . notify_activity ( & seat) ;
214214
215215 let keycode = event. key_code ( ) ;
216-
217216 let state = event. state ( ) ;
218217 trace ! ( ?keycode, ?state, "key" ) ;
219218
220219 let serial = SERIAL_COUNTER . next_serial ( ) ;
221220 let time = Event :: time_msec ( & event) ;
222-
223- const POWER_OFF : u32 = 116 ;
224- // if power key is pressed, just use the system action for power off
225- // this is a workaround for the fact that the power key is not
226- // available in the keymap, so we cannot use the keymap to determine
227- // if the key is pressed
228- if keycode. raw ( ) == POWER_OFF + X11_KEYCODE_OFFSET && state == KeyState :: Pressed
229- {
230- self . handle_action (
231- Action :: Shortcut ( shortcuts:: Action :: System (
232- shortcuts:: action:: System :: PowerOff ,
233- ) ) ,
234- & seat,
235- serial,
236- time,
237- Binding :: default ( ) ,
238- None ,
239- ) ;
240- }
241-
242221 let keyboard = seat. get_keyboard ( ) . unwrap ( ) ;
243222 let previous_modifiers = keyboard. modifier_state ( ) ;
244223 if let Some ( ( action, pattern) ) = keyboard
0 commit comments