test
This commit is contained in:
		
							parent
							
								
									beac5b1f2d
								
							
						
					
					
						commit
						704943ba62
					
				@ -26,10 +26,12 @@ def handle_client(s: socket):
 | 
				
			|||||||
    for fd, device in receive_devices(s):
 | 
					    for fd, device in receive_devices(s):
 | 
				
			||||||
        d[fd] = device
 | 
					        d[fd] = device
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    active_keys = {}
 | 
				
			||||||
    while True:
 | 
					    while True:
 | 
				
			||||||
        fd, event = receive_event(s)
 | 
					        fd, event = receive_event(s)
 | 
				
			||||||
        if event[1] in [29, 97, 157]:
 | 
					        if event[0] == 1:
 | 
				
			||||||
            print(event)
 | 
					            active_keys[event[1]] = event[2]
 | 
				
			||||||
 | 
					            print(i for i in active_keys if active_keys[i])
 | 
				
			||||||
        if fd == 4294967295:
 | 
					        if fd == 4294967295:
 | 
				
			||||||
            s.close()
 | 
					            s.close()
 | 
				
			||||||
            for fd in d:
 | 
					            for fd in d:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user