577 lines
17 KiB
HTML
577 lines
17 KiB
HTML
|
|
||
|
<!doctype html>
|
||
|
<html lang="en" class="no-js">
|
||
|
<head>
|
||
|
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<link rel="shortcut icon" href="../../assets/images/favicon.png">
|
||
|
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.7">
|
||
|
|
||
|
|
||
|
|
||
|
<title>Linux Move Cursor With Keyboard - Trent's Blog</title>
|
||
|
|
||
|
|
||
|
|
||
|
<link rel="stylesheet" href="../../assets/stylesheets/main.19753c6b.min.css">
|
||
|
|
||
|
|
||
|
<link rel="stylesheet" href="../../assets/stylesheets/palette.196e0c26.min.css">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
||
|
<style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<link rel="stylesheet" href="../../extra.css">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="" data-md-color-accent="">
|
||
|
|
||
|
|
||
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||
|
<label class="md-overlay" for="__drawer"></label>
|
||
|
<div data-md-component="skip">
|
||
|
|
||
|
|
||
|
<a href="#introduction" class="md-skip">
|
||
|
Skip to content
|
||
|
</a>
|
||
|
|
||
|
</div>
|
||
|
<div data-md-component="announce">
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<header class="md-header" data-md-component="header">
|
||
|
<nav class="md-header-nav md-grid" aria-label="Header">
|
||
|
<a href="../.." title="Trent's Blog" class="md-header-nav__button md-logo" aria-label="Trent's Blog">
|
||
|
|
||
|
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||
|
|
||
|
</a>
|
||
|
<label class="md-header-nav__button md-icon" for="__drawer">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
|
||
|
</label>
|
||
|
<div class="md-header-nav__title" data-md-component="header-title">
|
||
|
|
||
|
<div class="md-header-nav__ellipsis">
|
||
|
<span class="md-header-nav__topic md-ellipsis">
|
||
|
Trent's Blog
|
||
|
</span>
|
||
|
<span class="md-header-nav__topic md-ellipsis">
|
||
|
|
||
|
Linux Move Cursor With Keyboard
|
||
|
|
||
|
</span>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<label class="md-header-nav__button md-icon" for="__search">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||
|
</label>
|
||
|
|
||
|
<div class="md-search" data-md-component="search" role="dialog">
|
||
|
<label class="md-search__overlay" for="__search"></label>
|
||
|
<div class="md-search__inner" role="search">
|
||
|
<form class="md-search__form" name="search">
|
||
|
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
|
||
|
<label class="md-search__icon md-icon" for="__search">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||
|
</label>
|
||
|
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
||
|
</button>
|
||
|
</form>
|
||
|
<div class="md-search__output">
|
||
|
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||
|
<div class="md-search-result" data-md-component="search-result">
|
||
|
<div class="md-search-result__meta">
|
||
|
Initializing search
|
||
|
</div>
|
||
|
<ol class="md-search-result__list"></ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
</nav>
|
||
|
</header>
|
||
|
|
||
|
<div class="md-container" data-md-component="container">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<nav class="md-tabs md-tabs--active" aria-label="Tabs" data-md-component="tabs">
|
||
|
<div class="md-tabs__inner md-grid">
|
||
|
<ul class="md-tabs__list">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-tabs__item">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<a href="../.." class="md-tabs__link md-tabs__link--active">
|
||
|
Home
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-tabs__item">
|
||
|
|
||
|
|
||
|
<a href="../../links/" class="md-tabs__link">
|
||
|
Links
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</div>
|
||
|
</nav>
|
||
|
|
||
|
|
||
|
<main class="md-main" data-md-component="main">
|
||
|
<div class="md-main__inner md-grid">
|
||
|
|
||
|
|
||
|
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
||
|
<div class="md-sidebar__scrollwrap">
|
||
|
<div class="md-sidebar__inner">
|
||
|
|
||
|
|
||
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||
|
<label class="md-nav__title" for="__drawer">
|
||
|
<a href="../.." title="Trent's Blog" class="md-nav__button md-logo" aria-label="Trent's Blog">
|
||
|
|
||
|
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||
|
|
||
|
</a>
|
||
|
Trent's Blog
|
||
|
</label>
|
||
|
|
||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
||
|
|
||
|
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-1" type="checkbox" id="nav-1" checked>
|
||
|
<label class="md-nav__link" for="nav-1">
|
||
|
Home
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
</label>
|
||
|
<nav class="md-nav" aria-label="Home" data-md-level="1">
|
||
|
<label class="md-nav__title" for="nav-1">
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
Home
|
||
|
</label>
|
||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../.." class="md-nav__link">
|
||
|
Home
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../rewrite-hugo-themes-report-in-python/" class="md-nav__link">
|
||
|
Rewrite Hugo Themes Report in Python
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../lmde3-xfs-full-disk-encryption/" class="md-nav__link">
|
||
|
LMDE3 xfs Full Disk Encryption
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../faster-partitioning-with-sgdisk/" class="md-nav__link">
|
||
|
Faster Partitioning With sgdisk
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../clear-linux-guest-virt-manager/" class="md-nav__link">
|
||
|
Clear Linux Guest Virt Manager
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../clear-linux-encrypted-xfs-root/" class="md-nav__link">
|
||
|
Clear Linux Encrypted xfs Root
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../simplified-raspberry-streaming/" class="md-nav__link">
|
||
|
Simplified Raspberry Streaming
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item md-nav__item--active">
|
||
|
|
||
|
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
||
|
|
||
|
|
||
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
||
|
Linux Move Cursor With Keyboard
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
</label>
|
||
|
|
||
|
<a href="./" class="md-nav__link md-nav__link--active">
|
||
|
Linux Move Cursor With Keyboard
|
||
|
</a>
|
||
|
|
||
|
|
||
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
|
||
|
|
||
|
|
||
|
<label class="md-nav__title" for="__toc">
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
Table of contents
|
||
|
</label>
|
||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#introduction" class="md-nav__link">
|
||
|
Introduction
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#xdo-commands-for-moving-the-cursor" class="md-nav__link">
|
||
|
xdo commands for moving the cursor
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#map-keyboard-shortcuts" class="md-nav__link">
|
||
|
map keyboard shortcuts
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</nav>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</nav>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item md-nav__item--nested">
|
||
|
|
||
|
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" >
|
||
|
<label class="md-nav__link" for="nav-2">
|
||
|
Links
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
</label>
|
||
|
<nav class="md-nav" aria-label="Links" data-md-level="1">
|
||
|
<label class="md-nav__title" for="nav-2">
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
Links
|
||
|
</label>
|
||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="../../links/" class="md-nav__link">
|
||
|
Links
|
||
|
</a>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</nav>
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</nav>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
|
||
|
<div class="md-sidebar__scrollwrap">
|
||
|
<div class="md-sidebar__inner">
|
||
|
|
||
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
|
||
|
|
||
|
|
||
|
<label class="md-nav__title" for="__toc">
|
||
|
<span class="md-nav__icon md-icon"></span>
|
||
|
Table of contents
|
||
|
</label>
|
||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#introduction" class="md-nav__link">
|
||
|
Introduction
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#xdo-commands-for-moving-the-cursor" class="md-nav__link">
|
||
|
xdo commands for moving the cursor
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li class="md-nav__item">
|
||
|
<a href="#map-keyboard-shortcuts" class="md-nav__link">
|
||
|
map keyboard shortcuts
|
||
|
</a>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</nav>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div class="md-content">
|
||
|
<article class="md-content__inner md-typeset">
|
||
|
|
||
|
|
||
|
|
||
|
<h1>Linux Move Cursor With Keyboard</h1>
|
||
|
|
||
|
<p>date: 2020-06-21T22:01:35-07:00</p>
|
||
|
<h2 id="introduction"><strong>Introduction</strong></h2>
|
||
|
<p>Linux just makes everything so easy. On a laptop it can be tricky to place your
|
||
|
mouse cursor on exactly the correct pixel, using the touchpad.
|
||
|
This became apparent to myself while using GIMP to create some png button files
|
||
|
for a little tkinter project, but there must be other use-cases as well.</p>
|
||
|
<h2 id="xdo-commands-for-moving-the-cursor"><strong>xdo commands for moving the cursor</strong></h2>
|
||
|
<ul>
|
||
|
<li>move the cursor one pixel left:
|
||
|
<div class="highlight"><pre><span></span><code><span class="go">xdotool mousemove_relative -- -1 0</span>
|
||
|
</code></pre></div></li>
|
||
|
<li>move the cursor one pixel right:
|
||
|
<div class="highlight"><pre><span></span><code><span class="go">xdotool mousemove_relative -- 1 0</span>
|
||
|
</code></pre></div></li>
|
||
|
<li>move the cursor one pixel up:
|
||
|
<div class="highlight"><pre><span></span><code><span class="go">xdotool mousemove_relative -- 0 -1</span>
|
||
|
</code></pre></div></li>
|
||
|
<li>move the cursor one pixel down:
|
||
|
<div class="highlight"><pre><span></span><code><span class="go">xdotool mousemove_relative -- 0 1</span>
|
||
|
</code></pre></div></li>
|
||
|
</ul>
|
||
|
<h2 id="map-keyboard-shortcuts"><strong>map keyboard shortcuts</strong></h2>
|
||
|
<p>Now, in your keyboard settings, map the above commands to new custom shortcuts.
|
||
|
For instance, I find the</p>
|
||
|
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-super">Super</kbd><span>+</span><kbd class="key-arrow-up">Up</kbd></span></p>
|
||
|
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-super">Super</kbd><span>+</span><kbd class="key-arrow-down">Down</kbd></span></p>
|
||
|
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-super">Super</kbd><span>+</span><kbd class="key-arrow-left">Left</kbd></span></p>
|
||
|
<p><span class="keys"><kbd class="key-control">Ctrl</kbd><span>+</span><kbd class="key-super">Super</kbd><span>+</span><kbd class="key-arrow-right">Right</kbd></span></p>
|
||
|
<p>combinations to be convenient in the Mate Desktop. Enjoy!</p>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</article>
|
||
|
</div>
|
||
|
</div>
|
||
|
</main>
|
||
|
|
||
|
|
||
|
<footer class="md-footer">
|
||
|
|
||
|
<div class="md-footer-nav">
|
||
|
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
|
||
|
|
||
|
<a href="../simplified-raspberry-streaming/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||
|
<div class="md-footer-nav__button md-icon">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||
|
</div>
|
||
|
<div class="md-footer-nav__title">
|
||
|
<div class="md-ellipsis">
|
||
|
<span class="md-footer-nav__direction">
|
||
|
Previous
|
||
|
</span>
|
||
|
Simplified Raspberry Streaming
|
||
|
</div>
|
||
|
</div>
|
||
|
</a>
|
||
|
|
||
|
|
||
|
<a href="../../links/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||
|
<div class="md-footer-nav__title">
|
||
|
<div class="md-ellipsis">
|
||
|
<span class="md-footer-nav__direction">
|
||
|
Next
|
||
|
</span>
|
||
|
Links
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="md-footer-nav__button md-icon">
|
||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
|
||
|
</div>
|
||
|
</a>
|
||
|
|
||
|
</nav>
|
||
|
</div>
|
||
|
|
||
|
<div class="md-footer-meta md-typeset">
|
||
|
<div class="md-footer-meta__inner md-grid">
|
||
|
<div class="md-footer-copyright">
|
||
|
|
||
|
Made with
|
||
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||
|
Material for MkDocs
|
||
|
</a>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</footer>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<script src="../../assets/javascripts/vendor.0ac82a11.min.js"></script>
|
||
|
<script src="../../assets/javascripts/bundle.f81dfb4d.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
|
||
|
|
||
|
<script>
|
||
|
app = initialize({
|
||
|
base: "../..",
|
||
|
features: ['navigation.tabs'],
|
||
|
search: Object.assign({
|
||
|
worker: "../../assets/javascripts/worker/search.4ac00218.min.js"
|
||
|
}, typeof search !== "undefined" && search)
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|