Commodity valid hotkey combo

This forum is for general developer support questions.
Post Reply
User avatar
javierdlr
Beta Tester
Beta Tester
Posts: 389
Joined: Sun Jun 19, 2011 11:13 pm
Location: Donostia (GUIPUZCOA) - Spain
Contact:

Commodity valid hotkey combo

Post by javierdlr »

Hi, what are valid hotkeys combo (ALT+SHIFT+k; CONTROL+m;..) to add as HOTKEYS to a Commodity?
Just adding CX to KeymapSwitcher and want to know if 'ALT+SHIFT' alone is it valid (tried such on FKEY and AMIDOCK and both says 'ALT+SHIFT' is not possible).
Where can I look for such hotkey combo keys table?

TIA
User avatar
javierdlr
Beta Tester
Beta Tester
Posts: 389
Joined: Sun Jun 19, 2011 11:13 pm
Location: Donostia (GUIPUZCOA) - Spain
Contact:

Re: Commodity valid hotkey combo

Post by javierdlr »

Yes thx allready found that one.
Using HOTKEY.C example (updated to use AllocSysObject, FreeSysObject and ReadArgs() and fixed a couple of typos).
My main question is it possible to have 'SHIFT+ALT' or 'LCOMMAND+ALT' as hotkey-combo?
..
Answerting myself (seeing what HOTKEY.C does) is that i CAN'T use'em, need to "add" [highmap | ANSICode] (or as always I havne't understand anything) ;-P

BTW is someone wants to try it drop my an email jabiedlrATgmail.com (sources included)
kas1e
Beta Tester
Beta Tester
Posts: 543
Joined: Sat Jun 18, 2011 8:56 am
Contact:

Re: Commodity valid hotkey combo

Post by kas1e »

@all
Another question is: how we can handle pure "alt+shift" in our commodity at all ? Is there any way for ?
User avatar
tboeckel
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 68
Joined: Mon Jun 20, 2011 9:56 am
Contact:

Re: Commodity valid hotkey combo

Post by tboeckel »

kas1e wrote:Another question is: how we can handle pure "alt+shift" in our commodity at all ? Is there any way for ?
That is impossible. Shift, Alt, Ctrl are simple qualifier keys which just modify the behaviour of normal keys like 'a', 'b', 'c'. But qualifier keys alone never produce any usable sequence of hit keys.
kas1e
Beta Tester
Beta Tester
Posts: 543
Joined: Sat Jun 18, 2011 8:56 am
Contact:

Re: Commodity valid hotkey combo

Post by kas1e »

@Thore

What about "Amiga+Shift" , that one possible ? In other words we want to mimic usual behavior to switch by 2 keys. Ideally it should be alt+shift, but amiga+shift also can be ok (if possible)..
User avatar
tboeckel
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 68
Joined: Mon Jun 20, 2011 9:56 am
Contact:

Re: Commodity valid hotkey combo

Post by tboeckel »

kas1e wrote:@Thore

What about "Amiga+Shift" , that one possible ? In other words we want to mimic usual behavior to switch by 2 keys. Ideally it should be alt+shift, but amiga+shift also can be ok (if possible)..
Short answer: no
Long answer: read the commodities document that Thomas Rapp linked to again. It clearly points out which keys are qualifiers and which are not.

The only possibility is to talk to input.device directly by adding your own input handler via IND_ADDHANDLER and let that handler react on the desired key combinations. But even then it will be quite hard to correctly react on key combinations like Alt+Shift. Imagine the user wants to type a character which is only reachable by pressing Alt+Shift+X. Before the user gets the desired character your program will catch the Alt+Shift keys (because you have to press these first before you can finally press the X) and will do whatever it is supposed to do. Quite annoying if your program prevents you from typing certain characters this way...
Belxjander
Posts: 315
Joined: Mon May 14, 2012 11:26 pm
Location: 日本千葉県松戸市 / Matsudo City, Chiba, Japan
Contact:

Re: Commodity valid hotkey combo

Post by Belxjander »

I would think to use LCommand or RCommand and Space or Enter for triggering a Keyboard Map selection popup.

(I intend to sort out mapping the Zenkaku_Hankaku, Modoru, Kana/Hira, Kana/Hira/Roma keys as specfic IME triggers,
I've already submitted the keymappings in question on these forums elsewhere.)

Would they be useful Keymappings to have setup as specific qualifier combinations with a single rawcode for InputEditor usage?

I'm thinking along the lines of folding them into existing keymaps as Command/Alt/Shift qualified versions of the space bar.
this is a legal Commodities combination...maybe it will help as it can be modified or at least easy to type.

Maybe you can also use it?
User avatar
javierdlr
Beta Tester
Beta Tester
Posts: 389
Joined: Sun Jun 19, 2011 11:13 pm
Location: Donostia (GUIPUZCOA) - Spain
Contact:

Re: Commodity valid hotkey combo

Post by javierdlr »

Hi, now uses 'ALT+ESC' (working fine) as default key-combo, user can change it via HOTKEY tooltype (and it shows an error if such hotkey isn't valid, reverting to ALT+ESC).
Post Reply