Disable Pinch/Zoom Logitech K400 Keyboard Touchpad

When scrolling or using touchpad on the K400, heat of fingers, or accidental grazing occurs quite often, activating the Pinch and Zoom functions. However these functions are tied to keycode 37 (Usually Control. I've swapped Control_L with Super_L). Need to make touchpad stop Pinch and Zoom functions all together as to no longer be tied to keycode 37. Ubuntu 14.04. Thank you.

xinput list-props 9

Device 'Logitech K400':
Device Enabled (151):   1
Coordinate Transformation Matrix (153): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (278): 0
Device Accel Constant Deceleration (279):   1.000000
Device Accel Adaptive Deceleration (280):   1.000000
Device Accel Velocity Scaling (281):    10.000000
Device Product ID (267):    1133, 16459
Device Node (268):  "/dev/input/event12"
Evdev Axis Inversion (282): 0, 0
Evdev Axes Swap (284):  0
Axis Labels (285):  "Rel X" (161), "Rel Y" (162), "Rel Horiz Wheel" (276), "Rel Dial" (301), "Rel Vert Wheel" (277)
Button Labels (286):    "Button Left" (154), "Button Middle" (155), "Button Right" (156), "Button Wheel Up" (157), "Button Wheel Down" (158), "Button Horiz Wheel Left" (159), "Button Horiz Wheel Right" (160), "Button Side" (271), "Button Extra" (272), "Button Forward" (273), "Button Back" (274), "Button Task" (275), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270), "Button Unknown" (270)
Evdev Scrolling Distance (287): 1, 1, 1
Evdev Middle Button Emulation (288):    0
Evdev Middle Button Timeout (289):  50
Evdev Third Button Emulation (290): 0
Evdev Third Button Emulation Timeout (291): 0
Evdev Third Button Emulation Button (292):  3
Evdev Third Button Emulation Threshold (293):   0
Evdev Wheel Emulation (294):    0
Evdev Wheel Emulation Axes (295):   0, 0, 4, 5
Evdev Wheel Emulation Inertia (296):    10
Evdev Wheel Emulation Timeout (297):    200
Evdev Wheel Emulation Button (298): 4
Evdev Drag Lock Buttons (299):  0

xinput test 9

key release 37 
key press   37 

xev

KeyRelease event, serial 37, synthetic NO, window 0x6000001,
    root 0x2a4, subw 0x0, time 79761120, (368,436), root:(368,488),
    state 0x840, keycode 37 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

What I believe happens here, is that the keyboard sends mouse events on motion axis #4 which are then interpreted as wheel events. The left control key is inserted to distinguish two-finger scroll from two-finger pinch (without control key it scrolls, and with control key it will zoom).

Of course, all of that is completely useless and quite annoying, when you have web pages zooming in and out all over the place as those two-finger events fire off by accident all the time. Fortunately ... Linux can simply be told to ignore events on motion axis #4 and that's the end of that. I believe this will work on all systems, including Ubuntu ... but if anyone wants to test, by all means update me.

#!/bin/sh

XIN=/usr/bin/xinput
DEV1="pointer:Logitech USB Receiver"
DEV2="pointer:Logitech K400"

for DEV in "$DEV1" "$DEV2"
do
    MOUSEID=$($XIN --list --id-only "$DEV" 2>/dev/null)
    if [ -n "$MOUSEID" ]
    then
        echo "ID $MOUSEID is $DEV"

        # This disables the button 4 and button 5 which emulate scroll wheel.
        $XIN set-button-map "$MOUSEID" 1 2 3 0 0 0 0 0

        # This disables the translation from motion a[4] events into Wheel emulation.
        $XIN set-prop "$MOUSEID" --type=int --format=8 "Evdev Wheel Emulation Axes" 0, 0, 0, 0
    fi
done

Take note, that if you unplug the Logitech USB dongle and plug it back in again then settings will reset back to default and you need to run the script again. I'm sure there is a way to get these changes into the system defaults but this is sufficient for my purposes. For some reason my device has a different name to the original question, mine has wireless dongle with "Device Product ID (272): 1133, 50475" in the props so perhaps there are a bunch of similar devices out there.