I use Iterm2 on the Mac. Many times, I accidentally press Command+some key, so I'm wondering, is it possible to disable the Command shortcuts? Like Command+D for example, as I use tmux for split panes.
You'll want to override iTerm's default shortcuts with your own shortcuts to "Ignore".
Preferences > Key and press the + button at the bottom of the Global Shortcut Keys:
Then add an entry for Cmd+K and choose "Ignore" for the action:
This disables Cmd+K.
You could just go to Preferences > Keys and manually delete every shortcut with Cmd.