FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

fnKey and F6 F7 F8 F9 F10

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac
View previous topic :: View next topic  
Author Message
melomac
Newbie


Joined: 21 Dec 2004
Posts: 8
Location: Paris, France

PostPosted: Tue Dec 21, 2004 11:06 pm    Post subject: fnKey and F6 F7 F8 F9 F10 Reply with quote

Hi there,

I'm working on a script to desactivate the illumination of my PowerBook keyboard from my bed when i'm watching a DVD ;-)

I have seek around and still have no clue regarding the use of fnKey as a modifier or the working F6 F7 F8 F9 F10 special keycodes....

F6 -> Num lock
F7 -> Toggle video
F8 -> Illuminate keyboard off
F9 -> Illuminate keyboard down
F10 -> Illuminate keyboard up

The script in its b1 release is attached.

Please help.
Back to top
View user's profile Send private message Visit poster's website
melomac
Newbie


Joined: 21 Dec 2004
Posts: 8
Location: Paris, France

PostPosted: Wed Dec 22, 2004 6:59 am    Post subject: 20 more cents Reply with quote

If you use System Events :
tell application "System Events" to key code 101

or SEC Helper :
tell application "SEC Helper" to simulate keyboard virtual keycode 101

It press the same key, whatever the user checked in the "Keyboard & Mouse" preference pane, "Keyboard" tab, "Use the F1-F12 keys for custom actions" checkbox (PowerBook only).

Getting deeper, while AppleScript press F9, if you press the "fn" key, it doesn't behave as if you were pressing a "command" or an "option" key : "fn" doesn't seem to behave like a modifier.

Jonas, am I right ?

It would be great if the next release of Salling Clicker takes care of the missing special keys, and improve the modifier system.

For now, if someone have a temporary solution, you welcome !
Back to top
View user's profile Send private message Visit poster's website
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed Dec 22, 2004 6:35 pm    Post subject: Re: 20 more cents Reply with quote

I'm afraid what you're trying to do isn't possible right now. The hardware keys to control video/audio/brightness don't really seem to be "keys" in the normal sense.

Sorry.

- jonas

[quote="melomac"]If you use System Events :
tell application "System Events" to key code 101

or SEC Helper :
tell application "SEC Helper" to simulate keyboard virtual keycode 101

It press the same key, whatever the user checked in the "Keyboard & Mouse" preference pane, "Keyboard" tab, "Use the F1-F12 keys for custom actions" checkbox (PowerBook only).

Getting deeper, while AppleScript press F9, if you press the "fn" key, it doesn't behave as if you were pressing a "command" or an "option" key : "fn" doesn't seem to behave like a modifier.

Jonas, am I right ?

It would be great if the next release of Salling Clicker takes care of the missing special keys, and improve the modifier system.

For now, if someone have a temporary solution, you welcome ![/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Mac All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group