Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
6 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link

According to thisthis answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

    You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  2. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

    You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  2. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

    You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  2. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

5 added 1 character in body
source | link

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

    You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  2. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  1. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  1. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

    You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  2. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

4 added 30 characters in body
source | link

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  1. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  1. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

According to this answer you can move the pointer of your mouse with command-line with the following procedure:

  1. First you need to find mouse input device with

    grep mouse /proc/bus/input/devices | grep event
    

You should see something like H: Handlers=mouse0 event7 in my case. It could output more then one line if you have more then one mouse (e.g. touchpad). The important part is event7, it means you will write to /dev/input/event7.

  1. Then the following will move mouse pointer 100 pixels to the right:

    seconds=$(date +%s)
    type=2      # EV_REL
    code=0      # REL_X
    value=100   # 100 pixels
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    
    type=0      # EV_SYN
    code=0      # SYN_REPORT
    value=0
    
    printf '%08X%04X%04X%08X%08X\n' $value $code $type 0 $seconds | xxd -r -p | \
        perl -0777e 'print scalar reverse <>' > /dev/input/event7
    

I didn't test whether this procedure is equivalent to real mouse movement in the sense of interrupting locking mechanism.

3 added 1 character in body; deleted 7 characters in body
source | link
2 edited body
source | link
1
source | link