## Python <s>418</s> <s>351</s> 314 Bytes ##

Edit: Saved <s>67</s> 104Bytes thanks to the advice in the comments

    from win32api import*
    from msvcrt import*
    s=137
    G=GetSystemMetrics
    S=SetCursorPos
    x=G(0)//2
    y=G(1)//2
    c=3**.5
    Y=y-2*s/c
    d=Y-c*x
    e=Y+c*x
    S((x,y))
    while 1:
     (a,b)=GetCursorPos()
     b=min(max(b,int(c*a+d),int(-c*a+e)),int(y+s/c))
     a=min(max(a,x-s),x+s)
     S((a,b))
     if kbhit()and ord(getch())==27:break

Written in Python 3.4.1 on Windows, pywin needs to be installed.

My first code golf submission. Please feel free to suggest improvements