<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCPlugIn/value(forInputKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCPlugIn(im)valueForInputKey:"
  },
  "title" : "value(forInputKey:)"
}
-->

# value(forInputKey:)

Returns the current value for an input port.

```
func value(forInputKey key: String!) -> Any!
```

## Parameters

`key`

The key for the input port you want to check.

## Return Value

The value associated with the key or `nil` if called outside of the [`execute(_:atTime:withArguments:)`](/documentation/Quartz/QCPlugIn/execute(_:atTime:withArguments:)) method.

## Discussion

You call this method from within your [`execute(_:atTime:withArguments:)`](/documentation/Quartz/QCPlugIn/execute(_:atTime:withArguments:)) method to retrieve the input values of your custom patch.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)