Question: Since a few days, I am not being able to press `T` and any other key on my Wired Apple Keyboard. Nothing happens when I press `Shift` and `T`. Keyboard shortcuts like `Cmd+Shift+T` don't work. `Cmd+T` works.

To get a capital T, I need to turn on `Caps Lock` or copy and paste it from somewhere.

I enabled Verbose Boot by setting the kernel flags a long while ago. Maybe at the same time when the key stopped working right[1], after 20 lines of text the verbose boot kept typing in the `$` character automatically until I pressed any key on the keyboard.

I can fix this by attaching a non-Apple Keyboard, setting its layout and unplugging it, after which the Apple Keyboard starts working perfectly (which means there is no hardware problem). But when I reboot the key stops working again.

Also trying to press `Shift+T` in verbose boot does nothing, while other keys show up fine. `Shift+T` doesn't even work in Safari in Recovery Mode. I also can't reset the NVRAM by pressing `Command+Option+P+R`, it just takes me to recovery mode.

[1]: I don't remember doing anything except setting up oh-my-zsh around this time

Answer: 
Try the following:

1. Open the "Keyboard" preferences pane
2. In the "Keyboard" tab, turn on the "Show Keyboard and Character Viewers in menu bar" checkbox
3. Go to the new menu (it looks like a box with a command key clover-leaf in it) and choose "Show Keyboard Viewer"

You'll now see a window shaped like your keyboard, with every key shown, and each pressed key highlighted. Try out all the keys, especially the "t" and modifiers. Note that holding down "shift" will change the key display to capitals, and holding down "option" will change the key display to alternate characters. This should let you track down the problem, if it's in hardware.
I happen to have run into this today though probably for an unrelated reason, but maybe this will help someone else. I had recently installed Snap Camera and bound Shift-T and Shift-O to actions in the app. What I didn't realize was that the app stayed open in the background (with a menubar icon) and was capturing those keystrokes as long as it was running.

Holding down the Fn key is a good way to test for a hardware issue because the Shift-T and Shift-O keystrokes worked perfectly when holding down Fn.

It's likely this could happen for other apps that are doing systemwide keyboard capture of a specific keystroke.

Note to self: Always add modifier keys like Command, Option, Control when binding keys in something that's going to be listening in the background.