File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -347,20 +347,20 @@ def devices(self):
347
347
return self .hid .devices
348
348
349
349
def ble_monitor (self ):
350
- if self .ble_connected != self .connected :
350
+ if debug . enabled and self .ble_connected != self .connected :
351
351
self .ble_connected = self .connected
352
352
if self .connected :
353
- if debug .enabled :
354
- debug ('BLE connected' )
353
+ debug ('BLE connected' )
355
354
else :
356
- # Security-wise this is not right. While you're away someone turns
357
- # on your keyboard and they can pair with it nice and clean and then
358
- # listen to keystrokes.
359
- # On the other hand we don't have LESC so it's like shouting your
360
- # keystrokes in the air
361
- self .start_advertising ()
362
- if debug .enabled :
363
- debug ('BLE disconnected' )
355
+ debug ('BLE disconnected' )
356
+
357
+ if not self .connected :
358
+ # Security-wise this is not right. While you're away someone turns
359
+ # on your keyboard and they can pair with it nice and clean and then
360
+ # listen to keystrokes.
361
+ # On the other hand we don't have LESC so it's like shouting your
362
+ # keystrokes in the air
363
+ self .start_advertising ()
364
364
365
365
def clear_bonds (self ):
366
366
import _bleio
You can’t perform that action at this time.
0 commit comments