Re: Detecting select/adjust on file drag
- From: Martin Wuerthner <spamtrap@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 11:31:22 +0200
In message <na.2e29c84db2.a903c0mijas@xxxxxxxxxxxxxxxxx>
Mr John FO Evans <mijas@xxxxxxxxxxxxxxxxx> wrote:
> In article <4db19d9d53steve.revill.DELETE@xxxxxxxxxxxxx>, "Ste (news)"
> <steve.revill.DELETE@xxxxxxxxxxxxx> wrote:
>> or in C it could look something like:
>>
>> _swix(OS_Byte, _INR(0,1) | _OUT(1), 121, 0x80, &key);
>> if (key == 0xFF) /* a shift key is down */
>
> I had a few problems with os_byte 121 so I changed to os_byte 122 and used
> different keys.
Does not sound like a good idea. Why not OS_Byte 121? You really want
to check for a specific modifier key, which OS_Byte 121 allows you, as
opposed to check which non-modifier key is pressed (OS_Byte 122).
Non-modifier keys generate real keypress events, which can cause
headaches. As your task is the recipient of the drag, it is quite
likely that the source application or some other application has the
input focus. You do not really want to force the user to press a
"real" key, which could have a meaning in the application with the
input focus in order to invoke a function in the target application of
a drag.
Shift is used as a target modifier key when a file is dragged into a
TaskWindow, so you can be pretty sure that some future Filer will not
do funny things when a file is dragged to an application with Shift
held down. Therefore, I would recommend using Shift as the modifier
key. Ctrl and Alt are fine as well at the moment, but there is no
guarantee that they will be available in future versions of the Filer.
For instance, Alt-double-clicking used to be available but stopped
working in RO5 because the Filer interprets Alt-double-clicks itself.
Martin
--
---------------------------------------------------------------------
Martin Wuerthner MW Software http://www.mw-software.com/
ArtWorks 2 -- Designing stunning graphics has never been easier
spamtrap@xxxxxxxxxxxxxxx [replace "spamtrap" by "info" to reply]
.
- Follow-Ups:
- Re: Detecting select/adjust on file drag
- From: jgh
- Re: Detecting select/adjust on file drag
- References:
- Detecting select/adjust on file drag
- From: Mr John FO Evans
- Re: Detecting select/adjust on file drag
- From: Ste (news)
- Re: Detecting select/adjust on file drag
- From: Mr John FO Evans
- Detecting select/adjust on file drag
- Prev by Date: Re: 32-bit SharedCLibrary on the A9
- Next by Date: ColourTrans
- Previous by thread: Re: Detecting select/adjust on file drag
- Next by thread: Re: Detecting select/adjust on file drag
- Index(es):
Relevant Pages
|