# API or command to send text programmatically

**URL:** <https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345>\
**Category:** Help\
**Created:** [September 27, 2024, 11:35am UTC](https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345 "2024-09-27T11:35:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuzma](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kuzma](https://forum.cursor.com/u/kuzma)\
**Post date:** [September 27, 2024, 11:35am UTC](https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345/1 "2024-09-27T11:35:21Z")

</div>

I want to send a text string to the **Chat** panel in **Cursor**. At this moment, VS Code does not natively support sending keybindings directly to chat-like panels, such as the **Cursor Chat** or other similar extensions.

Is there an API or command to send text programmatically? I want to hook into that command via a keybinding.

At present I am using Maccy to paste my intro to each and every prompt and it is getting tiresome.

I need to preface my prompt with some instructions:

1. Cursors Composer mode is now the default, It allows users to apply changes across multiple files with a single click
2. never suggest EXPO or JSX and only use my actual code contained in files I identify to you and any other files I may reference in this prompt.
3. Read my prompt carefully and completely.
4. Double-check your responses for accuracy before sending them.
5. Focus on directly answering my specific questions without unnecessary additions.
6. Ask a question should you have one.
7. When you are ready to propose changes to my file, provide the complete file without any omissions so I can perform an accurate file comparison. provide the entire file with all the proposed changes incorporated, without any omissions or placeholder comments.

Now here is my prompt:

---

<div class="post-metadata">

**Author:** ![soorfett](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/soorfett/32/5835_2.png) [@soorfett](https://forum.cursor.com/u/soorfett)\
**Post date:** [September 27, 2024, 3:06pm UTC](https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345/2 "2024-09-27T15:06:40Z")

</div>

What is wrong with using custom instructions?

another approach is referencing a “notepad”

---

<div class="post-metadata">

**Author:** ![kuzma](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kuzma](https://forum.cursor.com/u/kuzma)\
**Post date:** [September 27, 2024, 3:52pm UTC](https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345/3 "2024-09-27T15:52:31Z")

</div>

My 7 points are set in cursor settings as my custom instructions. They are not being treated as part of my prompts.

I am unsure what you mean “referencing a notepad”. I currently use maccy on a Mac to manage my paste buffer but it is tedious. I am 2 weeks into cursor and already in my 3rd set of 500 fast responses. I also have my pre-prompt set to keypresses in terminal and editor and am just looking for the same in chat.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:16am UTC](https://forum.cursor.com/t/api-or-command-to-send-text-programmatically/19345/4 "2026-06-18T10:16:57Z")

</div>


