Affichage des articles dont le libellé est ergonomy. Afficher tous les articles
Affichage des articles dont le libellé est ergonomy. Afficher tous les articles

mardi 14 mai 2013

how bad mouse events are ergonomic papercuts

I tried to use this configuration bit to activate have trackpoint 'wheel' scrolling emulation.

Section "InputDevice"
       Identifier "TPPS/2 IBM TrackPoint"
       Driver     "evdev"
       Option     "Device" "/dev/input/by-path/platform-i8042-serio-1-event-mouse"
       Option     "GrabDevice" "False"
       Option     "EmulateWheel" "true" #Enable wheel emulation for the Trackpoint
       Option     "EmulateWheelButton" "2" #Use the middle button for the emulation
       Option     "XAxisMapping" "6 7" #Map trackpoint X axis to X axis of emulated wheel
       Option     "YAxisMapping" "4 5" #Map trackpoint Y axis to Y axis of emulated wheel
EndSection


I believe it caused some erroneous event duplications. Maybe down and up events being handled as being the same kind. It quickly drives you mad. Files asked to open instead of appended to selection. Boolean buttons doubly toggled in vain. So I backed to this old copy/pasted configuration. 

Section "InputDevice"
        Identifier      "USB Mouse"
        Driver          "mouse"
        Option          "Device"                "/dev/input/mice"
        Option          "SendCoreEvents"        "true"
        Option          "Protocol"              "IMPS/2"
        Option          "ZAxisMapping"          "4 5"
        Option          "Buttons"               "5"
EndSection


No frills but it works, and god does it makes you zen.

mardi 2 avril 2013

Little elisp proto-snippet of the day : duplicate-line, select-current-line

Because `C-a C-SPC C-e M-w` just doesn't cut it, and I like playing piano, I decided to dig the web for a few helpers. I'm quite fond of the keybindings right now, let's see if they stick.

(defun duplicate-line ()
  "copy the current line underneath"
  (interactive)
  (move-beginning-of-line 1)
  (kill-line)
  (yank)
  (open-line 1)
  (next-line 1)
  (yank)
  (move-beginning-of-line 1)
  (message "TODO: restore caret position?, on original or new line?"))

(defun select-current-line ()
  "Select the current line"
  (interactive)
  ;; (end-of-line) ; move to end of line
  ;; (set-mark (line-beginning-position))

  (beginning-of-line)
  (set-mark (line-end-position))
  (message "TODO: select from begin to end or end to begin ? (caret > [begin..end]/2 => beg to end. end to beg otherwise)"))

(global-set-key (kbd "C-S-d") 'duplicate-line)
(global-set-key (kbd "C-S-l") 'select-current-line)

samedi 14 avril 2012

Notes about Chrome Tabs. Ctrl, Shift and multiple tabs selection.

Messing with too many opened tabs in Chrome, I'm missing Firefox Tab Groups / Panorama. Just to bitch about Chrome I start shift-clicking tabs .. when they actually start to move together.  


It actually does what you'd expect:
  • Maintain SHIFT, click on two tabs, they're now a selected tab interval.
  • Maintain CTRL, click on many tabs, they're now a selected tab set.
The selection can be moved around in the tab bar, onto another window, or out to a new one. If you fiddle with a sparse tab set, the tabs will group together. It lacks a bit of user feedback, but beside that it does what you'd expect.

note: I run Chrome '20.0.1100.0 canary' on Windows XP.

Can't find any documentation about it, don't know if it's new or not.. but it's sure cute.


Edit: Tab Selection is really thought through. Operations allowed also include : 

  • pinning
  • closing* selection
  • closing* all but selection

(*) close a group isn't directly undo-able, Ctrl-Shift-T will re-open one at a time. nothing too bad.


And it's actually one year old. 'multiple tabs selection' or 'multiselect tabs'. cf these :
http://exde601e.blogspot.fr/2011/03/multiple-tab-selection-in-google-chrome.html
http://lifehacker.com/5791787/select-multiple-chrome-tabs-by-domain-or-history
http://www.thechromesource.com/tag/multiselect-chrome-tabs/
http://src.chromium.org/viewvc/chrome?view=rev&revision=78884


There's more: you can also select by domain or by opener.