This plugin enables mapping keys in X-Plane 12 to be sent to a virtual or remote machine via TCP. The virtual/remote machine will need to run xpkeylistener.py which will receive and simulate a keyboard key being pressed and released. The specific key being pressed can be modified in the xpkeysender.lua plugin. The use case this plugin was developed for is macOS X-Plane 12 users that want to run SayIntentions in a Windows VM and be able to map a key in X-Plane to be used with push-to-talk (PTT) in SayIntentions.
- Install FlyWithLua for X-Plane 12.
- Move
xpkeysender.luato theX-Plane 12/Resources/plugins/FlyWithLua/Scriptsfolder.
- Follow installation instructions for SayIntentionsForMac.
- Shut down the VM and configure port forwarding by opening
Settingsfor the Windows VM in UTM, go toNetwork > Port Forward, and clickNew. Configure the port forwarding as follows and clickSave:- Protocol:
TCP - Guest Address:
Blank - Guest Port:
27900 - Host Address:
Blank - Host Port:
27900
- Protocol:
- Setup SayIntentions to use the keyboard key specified in
xpkeysender.luafor push-to-talk (PTT). The default key used isn,m, andkfor key 1, key 2 and key 3 in thexpkeysender.luaplugin. - Install Python.
- Install the Python package pynput by using
pip install pynputfrom Windows Powershell.
- Map a keyboard or controller binding to
FlyWithLua/xpkeysender/send_key1,FlyWithLua/xpkeysender/send_key2, andFlyWithLua/xpkeysender/send_key3. By default, these will send the keysn,m, andkrespectively.
- Launch run.bat from SayIntentionsForMac.
- Launch xpkeylistener.py by double clicking or using
python .\xpkeylistener.pyfrom Windows Powershell. - Launch SayIntentions.
- Launch X-Plane 12.