qmk_firmware/assets/features_ps2_mouse.md.Bn8fTTVJ.js

16 lines
51 KiB
JavaScript
Raw Normal View History

import { _ as _export_sfc, c as createElementBlock, o as openBlock, a8 as createStaticVNode } from "./chunks/framework.B9AX-CPi.js";
const __pageData = JSON.parse('{"title":"PS/2 Mouse Support","description":"","frontmatter":{},"headers":[],"relativePath":"features/ps2_mouse.md","filePath":"features/ps2_mouse.md","lastUpdated":null}');
const _sfc_main = { name: "features/ps2_mouse.md" };
const _hoisted_1 = /* @__PURE__ */ createStaticVNode('<h1 id="ps2-mouse-support" tabindex="-1">PS/2 Mouse Support <a class="header-anchor" href="#ps2-mouse-support" aria-label="Permalink to &quot;PS/2 Mouse Support {#ps2-mouse-support}&quot;"></a></h1><p>Its possible to hook up a PS/2 mouse (for example touchpads or trackpoints) to your keyboard as a composite device.</p><p>To hook up a Trackpoint, you need to obtain a Trackpoint module (i.e. harvest from a Thinkpad keyboard), identify the function of each pin of the module, and make the necessary circuitry between controller and Trackpoint module. For more information, please refer to <a href="https://deskthority.net/wiki/TrackPoint_Hardware" target="_blank" rel="noreferrer">Trackpoint Hardware</a> page on Deskthority Wiki.</p><p>There are three available modes for hooking up PS/2 devices: USART (best), interrupts (better) or busywait (not recommended).</p><h2 id="the-circuitry-between-trackpoint-and-controller" tabindex="-1">The Circuitry between Trackpoint and Controller <a class="header-anchor" href="#the-circuitry-between-trackpoint-and-controller" aria-label="Permalink to &quot;The Circuitry between Trackpoint and Controller {#the-circuitry-between-trackpoint-and-controller}&quot;"></a></h2><p>To get the things working, a 4.7K drag is needed between the two lines DATA and CLK and the line 5+.</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span></span></span>\n<span class="line"><span> DATA ----------+--------- PIN</span></span>\n<span class="line"><span> |</span></span>\n<span class="line"><span> 4.7K</span></span>\n<span class="line"><span> |</span></span>\n<span class="line"><span>MODULE 5+ --------+--+--------- PWR CONTROLLER</span></span>\n<span class="line"><span> |</span></span>\n<span class="line"><span> 4.7K</span></span>\n<span class="line"><span> | </span></span>\n<span class="line"><span> CLK ------+------------ PIN</span></span></code></pre></div><h2 id="busywait-version" tabindex="-1">Busywait Version <a class="header-anchor" href="#busywait-version" aria-label="Permalink to &quot;Busywait Version {#busywait-version}&quot;"></a></h2><p>Note: This is not recommended, you may encounter jerky movement or unsent inputs. Please use interrupt or USART version if possible.</p><p>In rules.mk:</p><div class="language-make vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">make</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">PS2_MOUSE_ENABLE = yes</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">PS2_ENABLE = yes</span></span>\n<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">PS2_DRIVER = busywait</span></span></code></pre></div><p>In your keyboard config.h:</p><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#ifdef</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PS2_DRIVER_BUSYWAIT</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"># define</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PS2_CLOCK_PIN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> D1</span></span>\n<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"># define</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PS2_DATA_PIN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> D2</span></span>\n<span class
const _hoisted_87 = [
_hoisted_1
];
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", null, _hoisted_87);
}
const ps2_mouse = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
__pageData,
ps2_mouse as default
};