No Center Mouse Key - Can I Map A Keyboard Key?
Raik (463) 2061 posts |
3rdButton should do what you need.I have made any other versions from Thomas sources … |
Stuart Painting (5389) 714 posts |
One module that will do the job is KeyMapper. There’s a worked example of using KeyMapper on the Welcome to RISC OS Pi page. If fiddling around with key numbers isn’t your thing, KeyMapCfg (available from !Store) provides a way of changing KeyMapper settings from the RISC OS desktop. |
John WILLIAMS (8368) 493 posts |
and previously you said:
but the !WinMenu Help says,and my experience confirms: “This program simply sits in the background waiting for the ‘Windows’ key I see no mention of the “Menu” key at all! Is it that your laptop doesn’t have a Windows key – which is not what you said, twice? And all I wanted was for my posting of this morning to be a final helpful word for future searchers! |
Alan Adams (2486) 1149 posts |
Understood. However in VRPC-DL the Windows key is used as Break (can be disabled), so I wanted to use something else. One of the very few possible keys, F9, is the best candidate. |
John WILLIAMS (8368) 493 posts |
If you can find which key-numbering scheme allocates &1C0 as the LH Windows key, just substitute the corresponding code for F9 in Steve’s !RunImage. It’s just above the first REM lines after the first 3. Won’t Hid do it as Jean-Michel suggested? |
John WILLIAMS (8368) 493 posts |
It’s just above the first REM lines after the first 3. And the code to substitute with is: &189 and these particular codes are to be found at: https://www.riscosopen.org/wiki/documentation/show/Character%20Codes if you change your mind about F9. |
Alan Adams (2486) 1149 posts |
Thanks. I now have WinMenu adding F9 as a menu key on VRPC-DL |
John WILLIAMS (8368) 493 posts |
As I find the keyboard codes confusing, I have prepared this note for myself – it may help someone else: Character Codes There are a number of systems in place for keyboard codes &c. The one WinMenu uses is at: See also the codes at: and the codes at: which are often referred to as “INKEY codes” because they are used by the INKEY keyword in BASIC, and the corresponding OS_Byte keyboard scan calls. There are, of course, also the ASCII codes. |
Rick Murray (539) 13840 posts |
I’ll put them into logical order.
This matches the scan codes from the original Archimedes keyboard. These are then translated into:
These are, as John says, the INKEY codes. They are also the low level scan codes of the keyboard of the BBC Micro. There is data loss here, for example one can’t differentiate between Shift-Up and PageUp without actually checking the state of the Shift key.
The enhanced character codes that the Wimp uses to communicate various function key presses to applications. |
Rik Griffin (98) 264 posts |
Going back to the original question (from 8 years ago!) – I don’t know when it was added, but RISC OS has the facility to map the ‘special’ keyboard keys to commands. Just run !Boot, click the Keyboard icon, and use the ‘Macro keys’ section. There are three keys you can map – ‘left flag’, ‘right flag’ and ‘right menu’. Save this little BASIC program into !Boot.Library as ‘menuclick’ and then map the keyboard button of your choice to run the ‘menuclick’ command.
|
John WILLIAMS (8368) 493 posts |
Very elegant, Rik! Thank you. Wouldn’t have directly helped Alan, though, who wanted to map F9. |
Rik Griffin (98) 264 posts |
My memory is hazy but can’t you set an Alias$ variable to achieve this? Edit – no, you can program a function key to generate a string of input text, not run a command. |