Alex Hall wrote:
>
> I am successfully using hotkeys with win32con (thanks so much for that
> tip!!) but I want to use the numbers 1-0 (on the keyboard, not the
> numpad) instead of F keys. The code example I have says to use
> ord('x'), but I am not quite sure what this means or how to give the
> result of ord() to the hotkey dictionary. Does anyone know the codes
> to use? I have tried using win32con.49, win32con.VK_49, and all kinds
> of variants (using 1 instead of 49, using ord() right in the
> dictionary, using single quotes...) Google is not much help on this;
> the only forum I found talking about this said that it could not be done.

"ord" is a standard Python function that returns the numeric ASCII value
of a character.  The hotkey code for the 1 key is the ASCII value for
the character '1', which is the plain, ordinary integer 49.  You should
be able to use either ord('1') or 49.

-- 
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to