write a chrome browser plugin that would allow the current tap to have a right click…
- User
write a chrome browser plugin that would allow the current tap to have a right click option of adding to the task bar as a task bar shortcut
- Assistant
- User
is it possible to craete a python script that will tell which combination of keyboard keys have been pressed
- Assistant
- User
the last script works but adds future key presses to the outpu
- Assistant
If you want a script to output only the currently pressed keys without continuously adding future key presses to the output, you can adjust the script to clear the output each time a key press is detected. This way, you'll receive a display of only the keys currently pressed at that moment.
- User
add a small delay
- Assistant
To add a small delay between the outputs of currently pressed keys in the Python script using the
keyboardlibrary, you can use the function from the built-in module. This allows you to control how often the terminal updates the list of pressed keys when a key is pressed or released. - User
File "", line 31, in File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 882, in wait lock.wait() File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 117, in wait if _UninterruptibleEvent.wait(self, 0.5): File "C:\Python312\Lib\threading.py", line 655, in wait signaled = self._cond.wait(timeout) File "C:\Python312\Lib\threading.py", line 359, in wait gotit = waiter.acquire(True, timeout) KeyboardInterrupt: Execution interrupted
- Assistant
- User
display shoud just be the keys pressed
- Assistant
- User
ok now if say the Ctrl and X keys are pressed can python create an image or video representation of the event
- Assistant
- User
greate how about creating an image of a keyboard with the keys pressed
- Assistant
- User
AttributeError: 'int' object has no attribute 'name' Traceback (most recent call last): File "C:\Python312\Lib\site-packages\keyboard_generic.py", line 22, in invoke_handlers if handler(event): ^^^^^^^^^^^^^^ File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 474, in return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) ^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 53, in on_key_combination pressed_keys = {k.name for k in keyboard._pressed_events} # Get currently pressed keys ^^^^^^ AttributeError: 'int' object has no attribute 'name'
- Assistant
- User
ok this creates the keyboard image but does not show the key pressed
- Assistant
- User
still not hiliting the key pressed on the keyboard image
- Assistant
- User
- Assistant
- User
still not showing on the image which key was pressed
- Assistant
- User
still no hilite on the image
- Assistant
- User
Press any keys to create a keyboard image. Press 'esc' to exit. Traceback (most recent call last): File "C:\Python312\Lib\site-packages\keyboard_generic.py", line 22, in invoke_handlers if handler(event): ^^^^^^^^^^^^^^ File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 474, in return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) ^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 57, in on_key_press create_keyboard_image() # Create an updated keyboard image ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 39, in create_keyboard_image text_width, text_height = draw.textsize(key, font=font) ^^^^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize'
- Assistant
- User
Press any keys to create a keyboard image. Press 'esc' to exit. Traceback (most recent call last): File "C:\Python312\Lib\site-packages\keyboard_generic.py", line 22, in invoke_handlers if handler(event): ^^^^^^^^^^^^^^ File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 474, in return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) ^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 58, in on_key_press create_keyboard_image() # Create an updated keyboard image ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 40, in create_keyboard_image text_width, text_height = draw.textsize(key, font=font) # This might be where the issue was ^^^^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize'
- Assistant
- User
Press any keys to create a keyboard image. Press 'esc' to exit. Traceback (most recent call last): File "C:\Python312\Lib\site-packages\keyboard_generic.py", line 22, in invoke_handlers if handler(event): ^^^^^^^^^^^^^^ File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 474, in return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) ^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 58, in on_key_press create_keyboard_image() # Create an updated keyboard image ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 40, in create_keyboard_image text_width, text_height = draw.textsize(key, font=font) ^^^^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize'
- Assistant
- User
no errors but no hilite either
- Assistant
- User
still no hilite and is it ppossible to have 3d keyboard image
- Assistant
- User
Traceback (most recent call last): File "C:\Python312\Lib\site-packages\keyboard_generic.py", line 22, in invoke_handlers if handler(event): ^^^^^^^^^^^^^^ File "C:\Python312\Lib\site-packages\keyboard_init_.py", line 474, in return hook(lambda e: e.event_type == KEY_UP or callback(e), suppress=suppress) ^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 58, in on_key_press create_keyboard_image() # Create an updated keyboard image ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\smudg\DEV\kbtoimg.py", line 40, in create_keyboard_image text_width, text_height = draw.textsize(key, font=font) ^^^^^^^^^^^^^ AttributeError: 'ImageDraw' object has no attribute 'textsize'
- Assistant
- User
keyboard image looks good but no hilite
- Assistant
- User
keyboard is now 2d should be 3d and no hilite shown
- Assistant
- User
can the keybord image be animated to show the key(s) pressed
- Assistant
- User
not creating the animated image
- Assistant
- User
no animation
- Assistant
- User
does not animate the keypress
- Assistant
- User
still no animation
- Assistant
- User
still no animation
- Assistant
- User
still no animation, is the alternative way
- Assistant
- User
ok, this allows a working on screen keyboard that works. Now amend so that when the physical keybord key is pressed it is mirrored in the new on screen keyboard
- Assistant
- User
no mirroring
- Assistant
- User
still no mirroring
- Assistant
- User
ok numbers are working. prehaps the keyboard mirroring has to accept lower case and upper case letters as the same?
- Assistant
- User
still only mirroring numbers
- Assistant
- User
better numbers and letters now mirrored. what about the rest of the keys, space CTrl Fn etc
- Assistant
- User
STILL NOT MIRRORING ALL KEAYS
- Assistant
- User
BETTER BUT MISSING cTRL AND WINDOWS KEYS
- Assistant
- User
same as before
- Assistant
- User
cTRL, wINDOWS, AND CAPS LOCK NOT MIRRORING
- Assistant
- User
still no Windows key, or function key. also how to handle key combinations
- Assistant
- User
much better. now can the mirrored keys go back to original state after a short period
- Assistant
- User
can we make the keyboard more stylish
- Assistant
- User
good but the delay and release have gone
- Assistant
- User
when pressing left hand Ctrl key it hilites the right hand Ctrl key
- Assistant
- User
now not mirroring any Ctrl, Alt keys
- Assistant
- User
only space woring on lower row of keys
- Assistant