# How Many Keyboard Shortcuts Are There

Have you ever pressed key combination like
`Ctrl`+`Alt`+`⌦ Delete`?
or
`F10` `e` `c`?
(in Microsoft Windows, that activates menu, edit, and copy.)

How many chord combinations are there? Let's find out.

If we consider all the usual modifiers: `Alt` `Ctrl` `Shift` and `❖ Window`
Key, a total of 4 modifiers (not consider the right side modifiers for now). If we can use only 1 modifier, we have

`Alt``Ctrl``Shift``❖ Window`

we write:

# 4 things take 1, 4 possibilities C[4,1] = 4

For ease of calculation, let's say there are only 20 letter keys to chose from to be used with modifier. e.g.

`Ctrl`+`a``Ctrl`+`b``Ctrl`+`c`- ...
`Ctrl`+`t`

So the total is

C[4,1] = 4 4 * 20 = 80 # 80 possibilities of 4 modifiers holding 1 down, with 20 letter choices

If we can hold 2 modifiers, we have

`Alt`+`Ctrl``Alt`+`Shift``Alt`+`❖ Window``Ctrl`+`Shift``Ctrl`+`❖ Window``Shift`+`❖ Window`

or by a formula

C[4,2] = 6 # multiply by 20 letter key choices 6 x 20 = 180

The formula C[n,k] is
the possibilities of taking k things out of n.
( The formula is usually called Binomial coefficient, and is
`Binomial[n,k] := n! / (k! (n - k)! )`

)

Continue on, the total possibilities is

C[4,1] = 4 # 4 modifiers, holding 1 C[4,2] = 6 # 4 modifiers, holding 2 C[4,3] = 4 # 4 modifiers, holding 3 C[4,4] = 1 # 4 modifiers, holding 4 sum = 15 # multiply by 20 letter key choices 15 x 20 = 300

So 4 modifiers, holding 1 to 4 of them at the same time, plus a letter key give us 300 possibilities.

if we continue to count modifier by left/right, we have 8 modifiers:

C[8,1] = 8 # 8 modifiers, holding 1 C[8,2] = 28 # 8 modifiers, holding 2 C[8,3] = 56 C[8,4] = 70 sum = 162 162 * 20 = 3240 possibilities of chord with holding max of 4 out of 8, with 20 letter choices

So 8 modifiers, holding 1 to 4 of them at the same time, plus 20 letter key choices, give us 3240 possibilities.

we stop at holding 4 modifier at the same time.

### How Many Key Sequence Combinations Are There?

Now we consider key sequences such as
`F10` `e` `c`.

Let's call the first key (such as `F10`) the leader key.
Let's suppose there are 20 letter keys to chose from, for easy calculation.

For total of 3 key presses, counting the leader key, and suppose 20 letter key choices, we have 400 possibilities.

# 3 keys key sequence possibilities 1 * 20 * 20 = 400

# 4 keys key sequence possibilities 1 * 20 * 20 * 20 = 8000

that's a lot more than chord keys.

now we consider leader key sequence of 3 keys, but 2 different leader keys, we have

# 3 keys key sequence, 2 possible leader keys 2 * 20 * 20 = 800 # 2 leader key

Here's a list of n leader keys possibilities:

# 3 keys key sequence, n leader keys 1 * 20 * 20 = 400 # 1 leader key to chose from 2 * 20 * 20 = 800 # 2 leader key to chose from 3 * 20 * 20 = 1200 4 * 20 * 20 = 1600 5 * 20 * 20 = 2000 6 * 20 * 20 = 2400 7 * 20 * 20 = 2800 8 * 20 * 20 = 3200

so, 3-key sequence with a leader key, 20 letter key choices, 8 possible leader keys, we have 3200 possibilities.

## Conclusion

Comparing the ease of pressing keys and possible combinations, leader key beats modifiers combinations.