What is the difference between " " and {SPACE}

Class library usage, coding and language questions.
Niels Seidler
Posts: 1
Joined: Tue Apr 13, 2010 9:35 am

What is the difference between " " and {SPACE}

Post by Niels Seidler » Tue Apr 13, 2010 10:19 am

I want to maximize a window and found that the sequence: {Alt DOWN} {XKey}{Alt UP} opens the correct menu but the "X" key does not maximize the window.

This sequence does the trick: {Alt DOWN}{Space}{XKey}{Alt UP}

My questions then are:
1. Why does the first sequence not work?
2. When to use " " and when to use {SPACE}?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: What is the difference between " " and {SPACE}

Post by Support Team » Tue Apr 13, 2010 1:09 pm

The difference is that "{Key}" (e.g. "{Space}") does not change the state of modifier keys like Alt, Ctrl, or Shift, whereas " ", "A", or "@" change the modifiers state in order to really type that letter.
In other words: "A" will create an upper-case "A", no matter if you wrap it inside a "{Shift Down}{Shift Up}" or not. "{Akey}" will instead create a lower-case "a" if shift is not pressed and an upper-case "A" if you wrap it inside "{Shift Down}{Shift Up}" or have CapsLock on.

Ranorex Support Team