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