amiga.org
     
iconAll times are GMT -6. The time now is 08:59 PM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Operating System Specific Discussions » Amiga OS » Amiga OS -- Development » commoditie + keys handler

Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS.

Reply
 
Thread Tools Display Modes
Old 11-23-2004, 08:44 AM   #1
kas1e
Technoid
Points: 9,145, Level: 64 Points: 9,145, Level: 64 Points: 9,145, Level: 64
Activity: 27% Activity: 27% Activity: 27%
 
Join Date: Feb 2003
Posts: 414
Default commoditie + keys handler

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.


kas1e is offline   Reply With Quote
Old 11-24-2004, 03:52 AM   #2
Thomas
Kindred of Babble-on
Points: 13,942, Level: 76 Points: 13,942, Level: 76 Points: 13,942, Level: 76
Activity: 13% Activity: 13% Activity: 13%
 
Thomas's Avatar
 
Join Date: Jun 2002
Posts: 2,925
Default Re: commoditie + keys handler


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
__________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/
Thomas is offline   Reply With Quote
Reply

Bookmarks

Tags
commoditie , handler , keys

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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