<commit_before>#   -*- mode: org; fill-column: 60 -*-

#+TITLE: Xmodmap  | Deerpig's Dot Emacs
#+AUTHOR: <NAME>
#+EMAIL: <EMAIL>
#+STARTUP: showall
#+TOC: headlines 4
#+PROPERTY: header-args    :results drawer  :tangle /home/deerpig/.Xmodmap
  :PROPERTIES:
  :CUSTOM_ID: 
  :Name:      /home/deerpig/.dotfiles/dot-xmodmap.org
  :Created:   2019-05-14T08:19@Prek Leap (11.642600N-104.919210W)
  :ID:        a2420434-b757-4539-bd6e-0ba6d55126b7
  :VER:       611068833.564859634
  :GEO:       48P-491193-1287029-15
  :BXID:      pig:SYF7-6825
  :Class:     dotemacs
  :Type:      literate-program
  :Status:    wip
  :Licence:   MIT/CC BY-SA 4.0
  :END:

[[https://img.shields.io/badge/made%20by-Deerpig-999999.svg?style=flat-square]] 
[[https://img.shields.io/badge/class-dotemacs-0072B2.svg?style=flat-square]]
[[https://img.shields.io/badge/type-literate%20program-0072B2.svg?style=flat-square]]
[[https://img.shields.io/badge/status-wip-D55E00.svg?style=flat-square]]
[[https://img.shields.io/badge/licence-MIT%2FCC%20BY--SA%204.0-000000.svg?style=flat-square]]


* Introduction: the black art of keymapping
:PROPERTIES:
:ID:       142f872a-c78a-446d-bfff-40c9583e0713
:END:

Remap the following keys:

  - CapsLock  => Super
  - Alt_R     => Hyper
  - Control_R => menu  

SEE:

  - [[http://cs.gmu.edu/~sean/stuff/n800/keyboard/old.html][Using xmodmap]] | intro

  - [[https://wiki.archlinux.org/index.php/Xmodmap][xmodmap]] | ArchWiki
  - [[http://openbox.org/wiki/Help:Bindings][Help:Bindings]] | Openbox

  - [[http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap][List of Keysyms Recognised by Xmodmap]] | LQWiki

 SEE: /usr/share/X11/xkb/rules/base.lst


Helpful commands:

  - =xev=: interactively press a key and see info
  - =xmodmap -pke= : list all keybindings in xmodmap
  - =xmodmap ~/.Xmodmap= : test and reset changes


#+begin_src sh
!! .Xmodmap ================================================
!! Do Not Edit
!! tangled from ~/proj/deerpig/dotfiles/dot-xmodmap.org 
!! [2019-05-14 Tue]

! remap:
!  - caps_lock to super
!  - Control_L to menu
!  - Alt_L     to hyper<commit_msg>[edit] reorg notes and refs<commit_after>#   -*- mode: org; fill-column: 60 -*-

#+TITLE: Xmodmap  | Deerpig's Dot Emacs
#+AUTHOR: <NAME>
#+EMAIL: <EMAIL>
#+STARTUP: showall
#+TOC: headlines 4
#+PROPERTY: header-args    :results drawer  :tangle /home/deerpig/.Xmodmap
  :PROPERTIES:
  :CUSTOM_ID: 
  :Name:      /home/deerpig/.dotfiles/dot-xmodmap.org
  :Created:   2019-05-14T08:19@Prek Leap (11.642600N-104.919210W)
  :ID:        a2420434-b757-4539-bd6e-0ba6d55126b7
  :VER:       611068833.564859634
  :GEO:       48P-491193-1287029-15
  :BXID:      pig:SYF7-6825
  :Class:     dotemacs
  :Type:      literate-program
  :Status:    wip
  :Licence:   MIT/CC BY-SA 4.0
  :END:

[[https://img.shields.io/badge/made%20by-Deerpig-999999.svg?style=flat-square]] 
[[https://img.shields.io/badge/class-dotemacs-0072B2.svg?style=flat-square]]
[[https://img.shields.io/badge/type-literate%20program-0072B2.svg?style=flat-square]]
[[https://img.shields.io/badge/status-wip-D55E00.svg?style=flat-square]]
[[https://img.shields.io/badge/licence-MIT%2FCC%20BY--SA%204.0-000000.svg?style=flat-square]]


* Introduction: the black art of keymapping
:PROPERTIES:
:ID:       142f872a-c78a-446d-bfff-40c9583e0713
:END:

** Description

xmodmap - utility for modifying keymaps and pointer button mappings in X.

SEE =man xmodmap=

** How to Use

This file is for:

  - Notes and information about configuring xmodmap
  - The source for the ~/.Xmodmap config file.

When this file is tangled in org-babel-tangle-file, it
writes the contents of the src code blocks to the file
~/.Xmodmap.

An Ansible playbook is used to git pull the latest version
of this file, tangle the file and finally restart xmodmap so
that changes take effects.

** Notes

Remap the following keys:

  - CapsLock  => Super
  - Alt_R     => Hyper
  - Control_R => menu  

** References

  - [[http://cs.gmu.edu/~sean/stuff/n800/keyboard/old.html][Using xmodmap]] | intro
  - [[https://wiki.archlinux.org/index.php/Xmodmap][xmodmap]] | ArchWiki
  - [[http://openbox.org/wiki/Help:Bindings][Help:Bindings]] | Openbox
  - [[http://wiki.linuxquestions.org/wiki/List_of_Keysyms_Recognised_by_Xmodmap][List of Keysyms Recognised by Xmodmap]] | LQWiki

SEE: /usr/share/X11/xkb/rules/base.lst

Helpful commands:

  - =xev=: interactively press a key and see info
  - =xmodmap -pke= : list all keybindings in xmodmap
  - =xmodmap ~/.Xmodmap= : test and reset changes


#+begin_src sh
!! .Xmodmap ================================================
!! Do Not Edit
!! tangled from ~/proj/deerpig/dotfiles/dot-xmodmap.org 
!! [2019-05-14 Tue]

! remap:
!  - caps_lock to super
!  - Control_L to menu
!  - Alt_L     to hyper
{'fraction_non_alphanumeric': 0.16813048933500627, 'fraction_numerical': 0.07026348808030113, 'mean_word_length': 3.585810162991371, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4904237', 'n_tokens_mistral': 2173, 'n_tokens_neox': 1913, 'n_words': 361}