Re: Detecting select/adjust on file drag



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]
.



Relevant Pages

  • Re: Capture Shift Held Down When Application Starts?
    ... This checks if Shift is the only modifier key being pressed. ... >> the usual update routine and start the config form. ... Seaking mid to senior level developer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Capture Shift Held Down When Application Starts?
    ... This checks if Shift is the only modifier key being pressed. ... >> the usual update routine and start the config form. ... Seaking mid to senior level developer. ...
    (microsoft.public.dotnet.framework)
  • Re: Capture Shift Held Down When Application Starts?
    ... This checks if Shift is the only modifier key being pressed. ... >> the usual update routine and start the config form. ... Seaking mid to senior level developer. ...
    (microsoft.public.dotnet.general)
  • Re: Shift-Doubleclick
    ... > text regardless of what the real filetype is; ... > to run something and shift is held down - it claims the filetype as text ... but the Filer does more and a user application ...
    (comp.sys.acorn.programmer)
  • Re: Direction arrows
    ... Actually, you can use any modifier key (Command, Control, or Shift) with ... F14 except the Option key. ...
    (microsoft.public.mac.office.excel)