|
Register or have you forgotten your password?
|
|
|
| Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 | ||||||||
|
Technoid
![]()
Join Date: Feb 2003
Posts: 414
|
hello all. i want write commodie tool with key handler. i need handle some keys (not one, maybe 5-10). So, as i know, for software key handler aos have IDCMP flags for it: RAWKEY and VANILLAKEY. but IDCMP flags for active window only. I need anytime handler.
In rkrm3 i found some commoditie examples without IDCMP flags, with ArgString() func from amiga.lib. It's work anytime, not need window, only broker, but it trick only for one key. I try seatch on aminet, and in all case see only key handlers for active window, or only one key handler for argstring(). I need some like this: #define some keys, 1,2,3 for example. //?? CxBase=OpenLibrary("commodities.library",37L); broker = CxBroker(&newbroker, NULL); ActivateCxObj(broker, 1L); <here put handler to broker> // ?? processmesg(); //?? DeleteCxObj(broker); // remove commoditie CloseLibrary(CxBase); // close lib ///////////////////////////////////// processmesg() { switch(....) { case Key_1: printf("pressed key_1\n"); break; case Key_2: printf("pressed key_2\n"); break; case Key_3: printf("pressed key_3\n"); break; } }; So, i need little sample for anytime commoditie key handler. thanx all for advance. |
||||||||
|
|
|
|
|
#2 | ||||||||
|
Kindred of Babble-on
![]()
Join Date: Jun 2002
Posts: 2,925
|
AFAIK you have to create a seperate Filter/Sender/Translate combination for each key and attach it to the Broker. There is a nice function in amiga.lib: HotKey() creates all three objects in one go. Bye, Thomas |
||||||||
|
|
|
![]() |
| Bookmarks |
| Tags |
| commoditie , handler , keys |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ram-Handler Patch To 44.24? | dannyp1 | Amiga Software Issues and Discussion | 10 | 10-08-2008 04:48 AM |
| Ram-Handler Or AmberRam? | dannyp1 | Amiga Software Issues and Discussion | 1 | 09-21-2008 06:54 PM |
| What is ram-handler? | motorollin | Amiga Software Issues and Discussion | 15 | 05-31-2006 12:46 PM |
| smb-handler + winxp problem | kas1e | Amiga Software Issues and Discussion | 2 | 12-28-2004 01:48 PM |
| Bug in AmigaOS 3.9 ram-handler ? | Noster | Amiga OS -- Development | 17 | 02-04-2004 03:31 PM |