How to bind Ctrl+/ in python tkinter? -


<control-shift-key-0> <control-key-plus> 

works

<control-key-/> 

doesn't.

i unable bind ctrl+/ in python. please help. if there documentation of possible keys helpful couldn't find any. thanks.

use <control-slash>:

def quit(event):     print "you pressed control-forwardslash"     root.quit()  root = tk.tk() root.bind('<control-slash>', quit)      # forward-slash # root.bind('<control-backslash>', quit)  # backslash root.mainloop() 

i don't have link complete list of these event names. here partial list i've collected:

| event                 | name                  | | ctrl-c                | control-c             | | ctrl-/                | control-slash         | | ctrl-\                | control-backslash     | | ctrl+(mouse button-1) | control-1             | | ctrl-1                | control-key-1         | | enter key             | return                | |                       | button-1              | |                       | buttonrelease-1       | |                       | home                  | |                       | up, down, left, right | |                       | configure             | | window exposed        | expose                | | mouse enters widget   | enter                 | | mouse leaves widget   | leave                 | |                       | key                   | |                       | tab                   | |                       | space                 | |                       | backspace             | |                       | keyrelease-backspace  | | key release       | keyrelease            | | escape                | escape                | |                       | f1                    | |                       | alt-h                 | 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -