dvorak-qwerty.el 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ;;; dvorak-qwerty.el --- QWERTY input method for the dvorak system layout
  2. ;; Copyright © 2013-2014 Alex Kost
  3. ;; Author: Alex Kost <alezost@gmail.com>
  4. ;; Created: 19 Jul 2013
  5. ;; URL: https://github.com/alezost/dvorak-layouts.el
  6. ;; Keywords: input method
  7. ;; This program is free software; you can redistribute it and/or modify
  8. ;; it under the terms of the GNU General Public License as published by
  9. ;; the Free Software Foundation, either version 3 of the License, or
  10. ;; (at your option) any later version.
  11. ;; This program is distributed in the hope that it will be useful,
  12. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;; GNU General Public License for more details.
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Commentary:
  18. ;; This file provides an additional English QWERTY layout (input-method)
  19. ;; assuming that the current global layout (set in X or in terminal) is
  20. ;; "dvorak".
  21. ;; English QWERTY layout:
  22. ;;
  23. ;; `~ 1! 2" 3# 4; 5% 6: 7? 8* 9( 0) -_ =+
  24. ;; Q W E R T Y U I O P [{ ]}
  25. ;; A S D F G H J K L ;: '"
  26. ;; Z X C V B N M ,< .> /?
  27. ;;; Code:
  28. (require 'quail)
  29. (defvar dvorak-qwerty-title "q"
  30. "The title of the `dvorak-qwerty' input method.
  31. This title is displayed in the mode line when the input method is
  32. enabled.")
  33. ;;;###autoload
  34. (defun dvorak-qwerty ()
  35. "Set `dvorak-qwerty' input method."
  36. (interactive)
  37. (set-input-method "dvorak-qwerty"))
  38. (quail-define-package
  39. "dvorak-qwerty" "English" dvorak-qwerty-title nil
  40. "Standard QWERTY keyboard layout assuming that your system
  41. keyboard layout is dvorak."
  42. nil t t t t nil nil nil nil nil t)
  43. (quail-define-rules
  44. ("`" ?`)
  45. ("1" ?1)
  46. ("2" ?2)
  47. ("3" ?3)
  48. ("4" ?4)
  49. ("5" ?5)
  50. ("6" ?6)
  51. ("7" ?7)
  52. ("8" ?8)
  53. ("9" ?9)
  54. ("0" ?0)
  55. ("[" ?-)
  56. ("]" ?=)
  57. ("~" ?~)
  58. ("!" ?!)
  59. ("@" ?@)
  60. ("#" ?#)
  61. ("$" ?$)
  62. ("%" ?%)
  63. ("^" ?^)
  64. ("&" ?&)
  65. ("*" ?*)
  66. ("(" ?\()
  67. (")" ?\))
  68. ("{" ?_)
  69. ("}" ?+)
  70. ("'" ?q)
  71. ("," ?w)
  72. ("." ?e)
  73. ("p" ?r)
  74. ("y" ?t)
  75. ("f" ?y)
  76. ("g" ?u)
  77. ("c" ?i)
  78. ("r" ?o)
  79. ("l" ?p)
  80. ("/" ?\[)
  81. ("=" ?\])
  82. ("\\" ?\\)
  83. ("a" ?a)
  84. ("o" ?s)
  85. ("e" ?d)
  86. ("u" ?f)
  87. ("i" ?g)
  88. ("d" ?h)
  89. ("h" ?j)
  90. ("t" ?k)
  91. ("n" ?l)
  92. ("s" ?\;)
  93. ("-" ?')
  94. (";" ?z)
  95. ("q" ?x)
  96. ("j" ?c)
  97. ("k" ?v)
  98. ("x" ?b)
  99. ("b" ?n)
  100. ("m" ?m)
  101. ("w" ?,)
  102. ("v" ?.)
  103. ("z" ?/)
  104. ("\"" ?Q)
  105. ("<" ?W)
  106. (">" ?E)
  107. ("P" ?R)
  108. ("Y" ?T)
  109. ("F" ?Y)
  110. ("G" ?U)
  111. ("C" ?I)
  112. ("R" ?O)
  113. ("L" ?P)
  114. ("?" ?{)
  115. ("+" ?})
  116. ("|" ?|)
  117. ("A" ?A)
  118. ("O" ?S)
  119. ("E" ?D)
  120. ("U" ?F)
  121. ("I" ?G)
  122. ("D" ?H)
  123. ("H" ?J)
  124. ("T" ?K)
  125. ("N" ?L)
  126. ("S" ?:)
  127. ("_" ?\")
  128. (":" ?Z)
  129. ("Q" ?X)
  130. ("J" ?C)
  131. ("K" ?V)
  132. ("X" ?B)
  133. ("B" ?N)
  134. ("M" ?M)
  135. ("W" ?<)
  136. ("V" ?>)
  137. ("Z" ??))
  138. (provide 'dvorak-qwerty)
  139. ;;; dvorak-qwerty.el ends here