Hello,
I thought that HidMacros or LuaMacros would solve my problem, but it seems I'm stuck.
I have a Sun Type 7 Keyboard which I really like (the layout, the mushy feel, and the extra keys). These keys are easily usable in anything but Windows and come configured by default in pretty much and Xorg and XFree86 version (the keyboard is backwards compatible with earlier Type 5/6). There are 11 keys to the left of the keyboard and four in the top-right hand corner for a total of 15. Here's a page I found on the net which shows the keyboard in detail:
http://www.lemis.com/grog/photos/Photos ... 509&size=4
Windows doesn't recognize the keys at all. It doesn't do anything, and HidMacros fails to scan for them or show them as last keypresses. LuaMacros example script doesn't show them either.
For what it's worth, the keyboard returns completely "normal" scan codes in that Return is 0xff0d, Tab is 0xff09, etc. Some of the extra keys send (as reported by xev under Linux):
Help: 0xff6a
Stop: 0xff69
Front: 0x1005ff71
Again: 0xff66
Undo: 0xff65
Copy: 0x1008ff57
The example script doesn't return these scan codes at all. It does report Print Screen and Pause correctly:
Not yet assigned: 44
Not yet assigned: 255
(Print Screen: 0xff68)
Not yet assigned: 19
Not yet assigned: 255
(Pause: 0xff13)
For some reason, Tab and Return are not reported with the 255:
Not yet assigned: 09 (Tab is 0xff09)
Not yet assigned: 13 (Return is 0xff0d)
Assuming that there is a way to assign macros to Print Screen and/or Pause, it should be possible to assign them to other keys. Stop is 0xff69, so should report scan codes 45 followed by 255, but it doesn't.
A couple of questions:
1. Is Windows completely blocking these keys and does it mean it is impossible to use them?
2. Is it possible to bind these keys to some macros? I don't care for the original shortcuts, I want to be able to use them for various macros.
3. Is it possible to add support for this keyboard to LuaScripts?
How do I use extra keys on a keyboard?
Re: How do I use extra keys on a keyboard?
There are (at least) 2 ways how to read keyboard in windows:
- standard windows messages (WM_KEY_DOWN and others)
- raw input (low level, recognizing also different keyboards)
LuaMacros combines those 2 methods. If it doesn't see your extra keys probably one or both methods are failing.
Try to put command
in the beginning of your script - you will get lots of debug output but may see if at least raw input gets some message.
To your questions:
1) how can I know?
. The keyboard probably requires special windows driver to use those keys. I don't own this keyboard so cannot give you more specific info
2) only if you got at least raw messages for them and even in that case LuaMacros would have to be modified for this scenario
3) probably not. Not having this keyboard there's not much I can do
- standard windows messages (WM_KEY_DOWN and others)
- raw input (low level, recognizing also different keyboards)
LuaMacros combines those 2 methods. If it doesn't see your extra keys probably one or both methods are failing.
Try to put command
Code: Select all
lmc_log_all();
To your questions:
1) how can I know?
![Smile :-)](./images/smilies/icon_e_smile.gif)
2) only if you got at least raw messages for them and even in that case LuaMacros would have to be modified for this scenario
3) probably not. Not having this keyboard there's not much I can do
Petr Medek
LUAmacros author
LUAmacros author
Re: How do I use extra keys on a keyboard?
Ok, no luck.
I tried the RAW input and almost none of the keys appear to send any output (at least nothing that's logged). The only key that does send output is the suspend/power key (the Moon symbol), and the output is more-or-less identical to other keys (with the obvious difference that it appears as code 255).
It's strange that I don't need to do anything under Linux to make it work (even in a VM), but Windows fails to see them completely. In fact, it looks like Windows is actively filtering these keys out. With no driver available for the keyboard, I guess there's no way to make it work.
Thanks for the help, anyway, and for a great piece of software. I'll probably get myself a numpad to add these extra keys, as it appears to work with them without any issues.
I tried the RAW input and almost none of the keys appear to send any output (at least nothing that's logged). The only key that does send output is the suspend/power key (the Moon symbol), and the output is more-or-less identical to other keys (with the obvious difference that it appears as code 255).
It's strange that I don't need to do anything under Linux to make it work (even in a VM), but Windows fails to see them completely. In fact, it looks like Windows is actively filtering these keys out. With no driver available for the keyboard, I guess there's no way to make it work.
Thanks for the help, anyway, and for a great piece of software. I'll probably get myself a numpad to add these extra keys, as it appears to work with them without any issues.