Property Handle Key_Path
Read Access: | Get Key_Path to HandleVariable |
Write Access: | Set Key_Path to HandleVariable/Value |
The property Key_path determines where an object should look for key definitions(on_key Xxxx) after it has searched the current object. If the value is 0, the search should delegate and look at the parent. This is normal default behavior for non-modal objects. If the value is non-zero, that value is an object handle and the search should move to that object. This is used by modal panels to stop key-path delegation to a parent and to instead go directly to the desktop and is done as follows:
set Key_path to Desktop // set to desktop (skipping all objects)
The Key_path property is set automatically by the packages and should rarely be changed.
Non Modal objects set key_path to 0, which causes the object to delegate key assignments to their parent.
A modal object sets key_path to Desktop, which causes the object to delegates its key assignment to the desktop object.
Therefore, if an On_key is defined at the desktop, all objects will use it. If you do not want modal objects to use certain keys you should move those on_key commands up into the panel object. This way all non-modal views will inherit these keys but modal panels will not.
If you set Key_path to some value other than 0 or Desktop, the packages will not change this value. You will rarely want to make such a change.