Author Topic: Shift and space  (Read 1454 times)

0 Members and 1 Guest are viewing this topic.

Offline hoggy

  • * Ergonomics Moderator
  • Thread Starter
  • Posts: 1502
  • Location: Isle of Man
Shift and space
« on: Mon, 30 January 2012, 13:42:33 »
I think emacs has had this little gem for a while, but it's fairly new to me.

I want to remap the space bar to shift, but only when another key is pressed.  If the space bar is pressed by itself, I'd like the space.  

Does anyone know how I could achieve this?  Using windows 7.
GH Ergonomic Guide (in progress)
http://geekhack.org/index.php?topic=54680.0

Offline Gawkbasher

  • Posts: 220
Shift and space
« Reply #1 on: Mon, 30 January 2012, 13:46:18 »
Good luck with this.  I know you can't make a custom keyboard layout with Microsoft Keyboard Layout Creator to do this; I just tried.

Edit: Maybe AutoHotKey?  Anyone?
« Last Edit: Mon, 30 January 2012, 13:52:21 by Gawkbasher »
Topre Realforce 87U 45g / Logitech G9x / Razer Scarab
KBC Poker X (Blue)
/ KBC Poker X (Red)

Offline shogrran

  • Posts: 264
Shift and space
« Reply #2 on: Mon, 30 January 2012, 13:53:08 »
Hmmm... im thinking autohotkey... doesn't autohotkey support IF statements?
Razer Blackwidow Elite
CMStorm Quickfire Rapid
[SIGPIC][/SIGPIC]

Offline rodya

  • Posts: 115
  • Location: Southern California
Shift and space
« Reply #3 on: Mon, 30 January 2012, 13:54:57 »
I don't know how, but you can probably do it using AutoHotkey.

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Shift and space
« Reply #4 on: Mon, 30 January 2012, 13:56:29 »
A specific other key, or any key?
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline hoggy

  • * Ergonomics Moderator
  • Thread Starter
  • Posts: 1502
  • Location: Isle of Man
Shift and space
« Reply #5 on: Mon, 30 January 2012, 13:58:37 »
by other key, I mean 0-9, a-z, etc...
GH Ergonomic Guide (in progress)
http://geekhack.org/index.php?topic=54680.0

Offline hoggy

  • * Ergonomics Moderator
  • Thread Starter
  • Posts: 1502
  • Location: Isle of Man
Shift and space
« Reply #6 on: Mon, 30 January 2012, 14:42:55 »
Found it

Space Up:: Send, % "{Shift Up}" (A_TimeSincePriorHotkey < 200 ? " " : "")
+Space:: Send, +{Space}
Space:: RShift

nabbed it from http://shi-ra-be.blogspot.com/2009/09/autohotkey1sands.html
GH Ergonomic Guide (in progress)
http://geekhack.org/index.php?topic=54680.0

Offline pyro

  • Posts: 177
Shift and space
« Reply #7 on: Mon, 30 January 2012, 15:54:44 »
What you want is

Code: [Select]
Space UP::
if (A_PriorKey = &quot;space&quot;)
SendInput {Space}
SendInput {Shift Up}
return
Space::Shift

(Autohotkey_L required)

I can't type fluently like that, though, because whitespaces are only produced when space is released and not when it's pressed.

There's also another interesting script:

Code: [Select]
~space::shift

~ means the original key isn't hidden from the system, so the whitespace is produced immediately, but if you hold space afterwards it acts like shift.

I use neither.