Jump to content

Laptop Middle Mouse Button (Linux fix only)


Recommended Posts

I know that there are some controls in ksp that require the use of the middle mouse button to use (whack a kerbal, camera movement etc.) so I was wondering if there is any way to remap these controls to something else. I havent found anything in the in game settings or settings.cfg.

I run Ubuntu 12.04 on a macbook air if thats relevant to anyone.

--EDIT--

I found a rather complicated workaround for Linux that maps a key on the keyboard to the middle mouse button! check it out on the second page

Edited by peachoftree
Link to comment
Share on other sites

I had a broken mouse wheel during .23.5, and found a workaround for all features I knew of at the time. Since the .24 'mouse wheel precision maneuver node control' feature, I consider the mouse wheel essential.

most mice have a scroll wheel that you can click down on. i'm wondering how to simulate that functionality on my trackpad which can scroll but has no clickable scroll wheel. could you post these workarounds?

Link to comment
Share on other sites

Here's where I got my workarounds.

http://wiki.kerbalspaceprogram.com/wiki/Key_bindings

As I said, IMO, the mouse wheel is essential now.

Check your computing machines' manual. There are many sophisticated ( Two finger, tap and drag etc. ) manufacturer specific keypad shortcuts. If Mars has a Wal-Mart a new mouse is like $12.00 US.

Link to comment
Share on other sites

I run Ubuntu 12.04 on a macbook air if thats relevant to anyone.
Very. On most Linux distributions you can emulate a middle-click on a two-button mouse by clicking both buttons together. But if the Mac has a one button mouse I'm not sure what you do.

Regardless of details though, I'd say this is something you need to configure Ubuntu to handle. Linux and Unix before it expect a three-button mouse, getting some way to emulate a middle-click will be useful.

Link to comment
Share on other sites

I've looked around as well to no avail. Dropped my mouse a while ago and broke the MMB. The rest works fine and I learned how to zoom in the VAB on OSX without it (Shift+Two Finger Scrolling on the touchpad), but there doesn't seem to be any way to emulate clicking the MMB. So no Whack-a-Kerbal.

Link to comment
Share on other sites

Very. On most Linux distributions you can emulate a middle-click on a two-button mouse by clicking both buttons together. But if the Mac has a one button mouse I'm not sure what you do.

Regardless of details though, I'd say this is something you need to configure Ubuntu to handle. Linux and Unix before it expect a three-button mouse, getting some way to emulate a middle-click will be useful.

Alright. i'll do some research into this and post my findings here.

--EDIT--

I found this which might help for mac people but still searching for Ubuntu support. I feel like I'm close though. If it does say so, then I can mark this thread as answered

--EDIT 2--

[REDACTED] (See edit 3)

--EDIT 3--

Found complete soulution for linux :cool: see my post on next page

Edited by peachoftree
partial linux solution
Link to comment
Share on other sites

Quick Google found this article

http://mac.linux.be/content/tuning-ubuntu-macintosh-key-mapping-and-3-mouse-button-emulation-0

It's a bit old, but if the techniques still work they'll let you map rarely-used keyboard keys to work as the middle and right mouse buttons.

unfortunately it will only work with pre 2006 macs because thats when apple switched for the powerpc architecture to intel and this trick only works on powerpc mac's (I tried but the file it referenced is for network configuration now)

--EDIT--

I found a complete solution for Linux woot!:cool:

it works by remapping an unused key to the middle mouse button

Instructions (warning: if you suffer from the fear of the almighty command line I suggest you leave now)

1.) install the necessary packages using the command

 sudo apt-get install xev xkbset 

(some of them may already be present) (works in debian based distros if you have something else like yum or pacman use that instead) (the third needed package xmodmap comes with most distrobutions)

2.) type

xev

a small window will pop up. click on the window and without moving the mouse press the button you want to remap (it should be something that you never used, I did F4 because to use normal f-key function on my laptop you have to hold the fn key so the key I remapped was F4 without the fn key)

3.) in the terminal something like this:

KeyPress event, serial 33, synthetic NO, window 0x3400001,
root 0xac, subw 0x0, time 58634852, (112,61), root:(172,699),
state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
XLookupString gives 1 bytes: (65) "e"
XmbLookupString gives 1 bytes: (65) "e"
XFilterEvent returns: False

will show up. take note of the number after "keycode" on the third line. this is the key code (this one is for the 'e' key)

4.) close the small window and type

 xmodmap -e "keycode your_keycode = Pointer_Button2" 

(include the quotes and replace your_keycode with the mumber you got from step 3

5.) type

 xkbset m 

into the terminal to activate the changes.

6.) using your new middle mouse button: to click just press your key normaly. to click and drag hold your button while moving the mouse

7.) profit and shower me in rep!

Edited by peachoftree
added full linux fix
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...